From patchwork Wed Jun 23 07:04:10 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kenji Kaneshige X-Patchwork-Id: 107556 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o5N75Wh4030346 for ; Wed, 23 Jun 2010 07:05:32 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751493Ab0FWHFb (ORCPT ); Wed, 23 Jun 2010 03:05:31 -0400 Received: from fgwmail6.fujitsu.co.jp ([192.51.44.36]:40202 "EHLO fgwmail6.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751142Ab0FWHFb (ORCPT ); Wed, 23 Jun 2010 03:05:31 -0400 Received: from m4.gw.fujitsu.co.jp ([10.0.50.74]) by fgwmail6.fujitsu.co.jp (Fujitsu Gateway) with ESMTP id o5N75T5c029450 for (envelope-from kaneshige.kenji@jp.fujitsu.com); Wed, 23 Jun 2010 16:05:29 +0900 Received: from smail (m4 [127.0.0.1]) by outgoing.m4.gw.fujitsu.co.jp (Postfix) with ESMTP id B938045DE4D for ; Wed, 23 Jun 2010 16:05:28 +0900 (JST) Received: from s4.gw.fujitsu.co.jp (s4.gw.fujitsu.co.jp [10.0.50.94]) by m4.gw.fujitsu.co.jp (Postfix) with ESMTP id 544C245DE7B for ; Wed, 23 Jun 2010 16:05:28 +0900 (JST) Received: from s4.gw.fujitsu.co.jp (localhost.localdomain [127.0.0.1]) by s4.gw.fujitsu.co.jp (Postfix) with ESMTP id EA0A81DB8042 for ; Wed, 23 Jun 2010 16:05:27 +0900 (JST) Received: from m107.s.css.fujitsu.com (m107.s.css.fujitsu.com [10.249.87.107]) by s4.gw.fujitsu.co.jp (Postfix) with ESMTP id 861951DB803F for ; Wed, 23 Jun 2010 16:05:24 +0900 (JST) Received: from m107.css.fujitsu.com (m107 [127.0.0.1]) by m107.s.css.fujitsu.com (Postfix) with ESMTP id 125CB670002; Wed, 23 Jun 2010 16:05:24 +0900 (JST) Received: from [127.0.0.1] (unknown [10.124.100.137]) by m107.s.css.fujitsu.com (Postfix) with ESMTP id 8F980670007; Wed, 23 Jun 2010 16:05:23 +0900 (JST) X-SecurityPolicyCheck-FJ: OK by FujitsuOutboundMailChecker v1.3.1 Received: from KANE-LIFEBOOK[10.124.100.137] by KANE-LIFEBOOK (FujitsuOutboundMailChecker v1.3.1/9992[10.124.100.137]); Wed, 23 Jun 2010 16:04:48 +0900 (JST) Message-ID: <4C21B1EA.6090307@jp.fujitsu.com> Date: Wed, 23 Jun 2010 16:04:10 +0900 From: Kenji Kaneshige User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ja; rv:1.9.1.10) Gecko/20100512 Thunderbird/3.0.5 MIME-Version: 1.0 To: linux-pci@vger.kernel.org CC: jbarnes@virtuousgeek.org, greg@kroah.com Subject: [BUG][RFC][PATCH] PCI: kernel oops on access to pci proc file while hot-removal Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@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]); Wed, 23 Jun 2010 07:05:32 +0000 (UTC) Index: linux-2.6.34/drivers/pci/proc.c =================================================================== --- linux-2.6.34.orig/drivers/pci/proc.c +++ linux-2.6.34/drivers/pci/proc.c @@ -431,8 +431,6 @@ int pci_proc_detach_device(struct pci_de struct proc_dir_entry *e; if ((e = dev->procent)) { - if (atomic_read(&e->count) > 1) - return -EBUSY; remove_proc_entry(e->name, dev->bus->procdir); dev->procent = NULL; }