[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAE9FiQVEQO-dLJRjn9Z7JgwGWAn1M8S1Tn2_V0Fq+6kB0rG=Bg@mail.gmail.com>
Date: Fri, 26 Apr 2013 13:20:51 -0700
From: Yinghai Lu <yinghai@...nel.org>
To: Bjorn Helgaas <bhelgaas@...gle.com>
Cc: Gu Zheng <guz.fnst@...fujitsu.com>,
"linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] PCI: Fix racing for pci device removing via sysfs
On Fri, Apr 26, 2013 at 9:28 AM, Bjorn Helgaas <bhelgaas@...gle.com> 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.
Thanks
Yinghai
Download attachment "remove_callback_clean.patch" of type "application/octet-stream" (1113 bytes)
Download attachment "fix_racing_removing_2.patch" of type "application/octet-stream" (3528 bytes)
Powered by blists - more mailing lists