From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Brook Subject: Re: [PATCH RFC] qemu: fix hot remove assigned device Date: Mon, 8 Jun 2009 15:38:21 +0100 Message-ID: <200906081538.22186.paul@codesourcery.com> References: <1244481435-17224-1-git-send-email-weidong.han@intel.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Cc: avi@redhat.com, kvm@vger.kernel.org To: Weidong Han Return-path: Received: from mail.codesourcery.com ([65.74.133.4]:40716 "EHLO mail.codesourcery.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752038AbZFHOiW (ORCPT ); Mon, 8 Jun 2009 10:38:22 -0400 In-Reply-To: <1244481435-17224-1-git-send-email-weidong.han@intel.com> Content-Disposition: inline Sender: kvm-owner@vger.kernel.org List-ID: On Monday 08 June 2009, Weidong Han wrote: > When hot remove an assigned device, segmentation fault was triggered > by qemu_free(&pci_dev->qdev) in pci_unregister_device(). > pci_register_device() doesn't initialize or set pci_dev->qdev. For an > assigned device, qdev variable isn't touched at all. So segmentation > fault happens when to free a non-initialized qdev. Better would be to just disable hot remove for devices still using the legacy pci_register_device API. Paul