]> git.ipfire.org Git - thirdparty/qemu.git/commit
PPC: Fix crash on spapr_tce_table_finalize()
authorDavid Gibson <david@gibson.dropbear.id.au>
Mon, 8 Dec 2014 02:48:02 +0000 (13:48 +1100)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Wed, 14 Jan 2015 23:08:44 +0000 (17:08 -0600)
commit5b5c7bf8e5c0f1ba2ac15954a9d151f1c2e408ef
tree88f8e30a2d26d2965c8de433bcd994d4e93b4727
parent6df8cd2e275750b5ab2c13c8ed61cb7a223bb972
PPC: Fix crash on spapr_tce_table_finalize()

spapr_tce_table_finalize() can SEGV if the object was not previously
realized.  In particular this can be triggered by running
         qemu-system-ppc -device spapr-tce-table,?

The basic problem is that we have mismatched initialization versus
finalization: spapr_tce_table_finalize() is attempting to undo things that
are done in spapr_tce_table_realize(), not an instance_init function.

Therefore, replace spapr_tce_table_finalize() with
spapr_tce_table_unrealize().

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Cc: qemu-stable@nongnu.org
Signed-off-by: Alexander Graf <agraf@suse.de>
(cherry picked from commit 5f9490de566c5b092a6cfedc3c7a37a9c9dee917)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/ppc/spapr_iommu.c