From patchwork Thu May 6 18:58:12 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Williamson X-Patchwork-Id: 97435 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o46IwHpg016314 for ; Thu, 6 May 2010 18:58:17 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756009Ab0EFS6P (ORCPT ); Thu, 6 May 2010 14:58:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42996 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753625Ab0EFS6O (ORCPT ); Thu, 6 May 2010 14:58:14 -0400 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 o46IwDvX009961 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 6 May 2010 14:58:14 -0400 Received: from [172.17.72.7] (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o46IwDiR007828 for ; Thu, 6 May 2010 14:58:13 -0400 Subject: [PATCH] Fix segfault after device assignment hot remove From: Alex Williamson To: KVM list Date: Thu, 06 May 2010 12:58:12 -0600 Message-ID: <1273172292.2616.72.camel@localhost> Mime-Version: 1.0 X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Thu, 06 May 2010 18:58:18 +0000 (UTC) diff --git a/hw/device-assignment.c b/hw/device-assignment.c index 1f13a6d..b9cc06f 100644 --- a/hw/device-assignment.c +++ b/hw/device-assignment.c @@ -1390,6 +1390,7 @@ static int assigned_exitfn(struct PCIDevice *pci_dev) { AssignedDevice *dev = DO_UPCAST(AssignedDevice, dev, pci_dev); + QLIST_REMOVE(dev, next); deassign_device(dev); free_assigned_device(dev); return 0;