From patchwork Mon Apr 11 13:51:06 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 8802191 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 90A4CC0553 for ; Mon, 11 Apr 2016 13:51:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0BB4D20253 for ; Mon, 11 Apr 2016 13:51:45 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 378C42034B for ; Mon, 11 Apr 2016 13:51:44 +0000 (UTC) Received: from localhost ([::1]:55425 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1apcFj-00050e-L2 for patchwork-qemu-devel@patchwork.kernel.org; Mon, 11 Apr 2016 09:51:43 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38392) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1apcFU-0004vY-TE for qemu-devel@nongnu.org; Mon, 11 Apr 2016 09:51:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1apcFP-0003mR-Ag for qemu-devel@nongnu.org; Mon, 11 Apr 2016 09:51:28 -0400 Received: from smtp.citrix.com ([66.165.176.89]:37825) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1apcFP-0003mE-6p for qemu-devel@nongnu.org; Mon, 11 Apr 2016 09:51:23 -0400 X-IronPort-AV: E=Sophos;i="5.24,462,1454976000"; d="scan'208";a="346194666" From: Anthony PERARD To: Date: Mon, 11 Apr 2016 14:51:06 +0100 Message-ID: <1460382666-29885-1-git-send-email-anthony.perard@citrix.com> X-Mailer: git-send-email 2.8.0 MIME-Version: 1.0 X-DLP: MIA2 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 66.165.176.89 Subject: [Qemu-devel] [PATCH for-2.6] xen: Fix IDE unplug X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Anthony PERARD , Stefano Stabellini , John Snow , Max Reitz Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP After commit e5e7855 (blockdev: Separate BB name management), starting a guest with PVHVM support result in this assert: qemu-system-i386: block/block-backend.c:173: blk_delete: Assertion `!blk->name' failed. A backtrace show that a caller is pci_piix3_xen_ide_unplug(). This patch fix it. Signed-off-by: Anthony PERARD Acked-by: Stefano Stabellini --- hw/ide/piix.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/ide/piix.c b/hw/ide/piix.c index 0a4cbcb..6d76ce9 100644 --- a/hw/ide/piix.c +++ b/hw/ide/piix.c @@ -189,6 +189,7 @@ int pci_piix3_xen_ide_unplug(DeviceState *dev) idedev = pci_ide->bus[di->bus].slave; } idedev->conf.blk = NULL; + monitor_remove_blk(blk); blk_unref(blk); } }