From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N4tgB-0008Dy-IR for qemu-devel@nongnu.org; Mon, 02 Nov 2009 04:58:27 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N4tg7-0008CG-LA for qemu-devel@nongnu.org; Mon, 02 Nov 2009 04:58:27 -0500 Received: from [199.232.76.173] (port=51522 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N4tg7-0008C7-Gh for qemu-devel@nongnu.org; Mon, 02 Nov 2009 04:58:23 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39234) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N4tg6-0000We-T5 for qemu-devel@nongnu.org; Mon, 02 Nov 2009 04:58:23 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nA29wL1K002859 for ; Mon, 2 Nov 2009 04:58:22 -0500 Message-ID: <4AEEAD3A.1010306@redhat.com> Date: Mon, 02 Nov 2009 10:58:18 +0100 From: Gerd Hoffmann MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] qdev: Check if unplug handler exists before calling it References: <1257154001-15403-1-git-send-email-amit.shah@redhat.com> In-Reply-To: <1257154001-15403-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 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 Hoffmann cheers, Gerd