From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N4t4B-0000Ov-J9 for qemu-devel@nongnu.org; Mon, 02 Nov 2009 04:19:11 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N4t45-0000Np-TL for qemu-devel@nongnu.org; Mon, 02 Nov 2009 04:19:10 -0500 Received: from [199.232.76.173] (port=33713 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N4t45-0000Nm-Pm for qemu-devel@nongnu.org; Mon, 02 Nov 2009 04:19:05 -0500 Received: from mx1.redhat.com ([209.132.183.28]:29502) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N4t45-00030Y-Br for qemu-devel@nongnu.org; Mon, 02 Nov 2009 04:19:05 -0500 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nA29J0ef011585 for ; Mon, 2 Nov 2009 04:19:00 -0500 Message-ID: <4AEEA400.40001@redhat.com> Date: Mon, 02 Nov 2009 10:18:56 +0100 From: Gerd Hoffmann MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] qdev: Check if unplug handler exists before calling it References: <1257143276-9428-1-git-send-email-amit.shah@redhat.com> In-Reply-To: <1257143276-9428-1-git-send-email-amit.shah@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Amit Shah Cc: qemu-devel@nongnu.org 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->unplug != NULL) ? cheers, Gerd