fix double free the memslot in kvm_set_phys_mem
authorXiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Fri, 31 May 2013 08:52:18 +0000 (16:52 +0800)
committerAnthony Liguori <aliguori@us.ibm.com>
Mon, 3 Jun 2013 20:21:27 +0000 (15:21 -0500)
commit651eb0f41b793021f7de672de78892def5819fb9
tree03175cafce0ba8bef54f9076e1046ae6effe196f
parent25b483381adf4144bad3cf3f433b4658da5e15bb
fix double free the memslot in kvm_set_phys_mem

Luiz Capitulino reported that guest refused to boot and qemu
complained with:
kvm_set_phys_mem: error unregistering overlapping slot: Invalid argument

It is caused by commit 235e8982ad that did double free for the memslot
so that the second one raises the -EINVAL error

Fix it by reset memory size only if it is needed

Reported-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
kvm-all.c
This page took 0.025626 seconds and 4 git commands to generate.