Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1540486 > unrolled thread

Re: [PATCH] driver core: flush async calls before testing driver removal

Started byTejun Heo <tj@kernel.org>
First post2016-12-12 19:00 +0100
Last post2016-12-12 19:50 +0100
Articles 3 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] driver core: flush async calls before testing driver  removal Tejun Heo <tj@kernel.org> - 2016-12-12 19:00 +0100
    Re: [PATCH] driver core: flush async calls before testing driver removal Rob Herring <robh@kernel.org> - 2016-12-12 19:40 +0100
      Re: [PATCH] driver core: flush async calls before testing driver  removal Tejun Heo <tj@kernel.org> - 2016-12-12 19:50 +0100

#1540486 — Re: [PATCH] driver core: flush async calls before testing driver removal

FromTejun Heo <tj@kernel.org>
Date2016-12-12 19:00 +0100
SubjectRe: [PATCH] driver core: flush async calls before testing driver removal
Message-ID<sND3j-7j0-3@gated-at.bofh.it>
Hello,

On Sun, Dec 11, 2016 at 03:44:36AM +0200, Vladimir Zapolskiy wrote:
> On 12/10/2016 03:04 PM, Greg Kroah-Hartman wrote:
> > Hm, how does this not also get hit if you unbind/bind/unbind/bind/etc.
> > from userspace as well?  I don't think this is a
> > CONFIG_DEBUG_TEST_DRIVER_REMOVE issue, but just that this option finds
> > the problem corner cases as you are finding out :)
> > 
> 
> and you are right, I managed to reproduce exactly the same race as before
> running the unmodified kernel built from Torvald's branch head:

Ah, you're right, so this means we need to add flush to all async
probing drivers.  Will do so for libata shortly.

Thanks!

-- 
tejun

[toc] | [next] | [standalone]


#1540528 — Re: [PATCH] driver core: flush async calls before testing driver removal

FromRob Herring <robh@kernel.org>
Date2016-12-12 19:40 +0100
SubjectRe: [PATCH] driver core: flush async calls before testing driver removal
Message-ID<sNDG2-7LQ-33@gated-at.bofh.it>
In reply to#1540486
On Mon, Dec 12, 2016 at 11:50 AM, Tejun Heo <tj@kernel.org> wrote:
> Hello,
>
> On Sun, Dec 11, 2016 at 03:44:36AM +0200, Vladimir Zapolskiy wrote:
>> On 12/10/2016 03:04 PM, Greg Kroah-Hartman wrote:
>> > Hm, how does this not also get hit if you unbind/bind/unbind/bind/etc.
>> > from userspace as well?  I don't think this is a
>> > CONFIG_DEBUG_TEST_DRIVER_REMOVE issue, but just that this option finds
>> > the problem corner cases as you are finding out :)
>> >
>>
>> and you are right, I managed to reproduce exactly the same race as before
>> running the unmodified kernel built from Torvald's branch head:
>
> Ah, you're right, so this means we need to add flush to all async
> probing drivers.  Will do so for libata shortly.

Maybe I'm confused, but don't you need this for all drivers? You need
sync the async SCSI scanning to the driver remove regardless of async
probe. The driver core synchronization is only for synchronizing the
remove with probe AIUI.

Rob

[toc] | [prev] | [next] | [standalone]


#1540543

FromTejun Heo <tj@kernel.org>
Date2016-12-12 19:50 +0100
Message-ID<sNDPI-7Pk-29@gated-at.bofh.it>
In reply to#1540528
Hello,

On Mon, Dec 12, 2016 at 12:33:36PM -0600, Rob Herring wrote:
> Maybe I'm confused, but don't you need this for all drivers? You need
> sync the async SCSI scanning to the driver remove regardless of async
> probe. The driver core synchronization is only for synchronizing the
> remove with probe AIUI.

Heh, I'm not quite following what you mean.  Can you please elaborate?
Also, on the second thought, it probably would be better to flush
async calls before unbind.  It's fragile to require indivdiual drivers
to do that and I can't think of benefits of doing so.  It's not like
the unbind / unload paths are hot in any way.

Thanks.

-- 
tejun

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web