Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756628Ab3DZUxf (ORCPT ); Fri, 26 Apr 2013 16:53:35 -0400 Received: from mail-vb0-f42.google.com ([209.85.212.42]:57925 "EHLO mail-vb0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755168Ab3DZUxd (ORCPT ); Fri, 26 Apr 2013 16:53:33 -0400 MIME-Version: 1.0 In-Reply-To: References: <1366940841-15370-1-git-send-email-yinghai@kernel.org> From: Bjorn Helgaas Date: Fri, 26 Apr 2013 14:53:09 -0600 Message-ID: Subject: Re: [PATCH] PCI: Fix racing for pci device removing via sysfs To: Yinghai Lu Cc: Gu Zheng , "linux-pci@vger.kernel.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1082 Lines: 27 On Fri, Apr 26, 2013 at 2:20 PM, Yinghai Lu wrote: > On Fri, Apr 26, 2013 at 9:28 AM, Bjorn Helgaas wrote: >> This is a gross hack. Iterating through all known pci_devs to see if >> this one still exists? >> >> I reproduced the original problem, applied this patch, and verified >> that it avoids the original crash. >> >> However, it's still incorrect because now you're looking at pdev after >> it's been freed. With CONFIG_SLUB_DEBUG_ON=y, the removal still causes >> a crash in remove_callback(). >> > > Yes, there is small window, that could have bus and dev get freed... > > Please check attached that should address your concerns. You can't be serious. This is a disgusting mess. Checking a list pointer for LIST_POISON1? As far as I'm concerned, this is a waste of my time. Bjorn -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/