diff options
author | Bharata B Rao <bharata@linux.vnet.ibm.com> | 2017-07-21 10:21:06 +0530 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2017-07-25 11:14:25 +1000 |
commit | 8d5981c4fc1342829b23666b7e7b28b4c2ce1d8a (patch) | |
tree | bae63ad39659cbbd759e5b2d5663be0c4e89c36e /block/iscsi.c | |
parent | e8cd4247e96bb2158ef0ae0ff20e72746b9dd32d (diff) |
spapr: Fix QEMU abort during memory unplug
Commit 0cffce56 (hw/ppc/spapr.c: adding pending_dimm_unplugs to
sPAPRMachineState) introduced a new way to track pending LMBs of DIMM
device that is marked for removal. Since this commit we can hit the
assert in spapr_pending_dimm_unplugs_add() in the following situation:
- DIMM device removal fails as the guest doesn't allow the removal.
- Subsequent attempt to remove the same DIMM would hit the assert
as the corresponding sPAPRDIMMState is still part of the
pending_dimm_unplugs list.
Fix this by removing the assert and conditionally adding the
sPAPRDIMMState to pending_dimm_unplugs list only when it is not
already present.
Fixes: 0cffce56ae3501c5783d779f97993ce478acf856
Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
[dwg: Tweaked to avoid returning NULL when spapr_pending_dimm_unplugs_add()
does find an existing entry]
Reviewed-by: Daniel Barboza <danielhb@linux.vnet.ibm.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'block/iscsi.c')
0 files changed, 0 insertions, 0 deletions