Re: [Qemu-devel] [PATCH] qdev: Check if unplug handler exists before calling it

2009-11-02 Thread Gerd Hoffmann
On 11/02/09 10:26, Amit Shah wrote: A bus may have hotplugging enabled but not have the 'unplug' callback defined, which would lead to a crash on trying to unplug a device on the bus. Fix by introducing an assert to check if the callback is valid. Signed-off-by: Amit Shah Acked-by: Gerd Hoffm

[Qemu-devel] [PATCH] qdev: Check if unplug handler exists before calling it

2009-11-02 Thread Amit Shah
A bus may have hotplugging enabled but not have the 'unplug' callback defined, which would lead to a crash on trying to unplug a device on the bus. Fix by introducing an assert to check if the callback is valid. Signed-off-by: Amit Shah --- hw/qdev.c |2 ++ 1 files changed, 2 insertions(+),

Re: [Qemu-devel] [PATCH] qdev: Check if unplug handler exists before calling it

2009-11-02 Thread Gerd Hoffmann
On 11/02/09 07:27, Amit Shah wrote: A bus may have hotplugging enabled but not have the 'unplug' callback defined, which would lead to a crash on trying to unplug a device on the bus. Which would be a clear bug in the bus implementation. +if (!dev->info->unplug) { assert(dev->info->unpl

[Qemu-devel] [PATCH] qdev: Check if unplug handler exists before calling it

2009-11-01 Thread Amit Shah
A bus may have hotplugging enabled but not have the 'unplug' callback defined, which would lead to a crash on trying to unplug a device on the bus. Fix by checking if the callback is valid Signed-off-by: Amit Shah --- hw/qdev.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) dif