public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Russ Dill <russ.dill@gmail.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Greg KH <greg@kroah.com>, Alan Stern <stern@rowland.harvard.edu>,
	Greg KH <gregkh@suse.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-usb@vger.kernel.org
Subject: Re: [GIT PATCH] USB patches for 2.6.33-git
Date: Mon, 14 Dec 2009 23:11:56 -0700	[thread overview]
Message-ID: <4B2728AC.8050001@gmail.com> (raw)
In-Reply-To: <alpine.LFD.2.00.0912142158260.14385@localhost.localdomain>

[-- Attachment #1: Type: text/plain, Size: 1540 bytes --]

Linus Torvalds wrote:
> 
> On Mon, 14 Dec 2009, Russ Dill wrote:
>> From: Russ Dill <Russ.Dill@gmail.com>
>> Date: Wed, 18 Nov 2009 10:31:27 -0700
>> Subject: [PATCH] Close usb_find_interface race v3
>  [...]
> 
> Ok, patch looks good to me.
> 
> However, now I just wonder whether this re-introduces the original race.
> 
> In the original race description:
> 
>> USB drivers that create character devices call usb_register_dev in their
>> probe function. This associates the usb_interface device with that minor
>> number and creates the character device and announces it to the world.
>> However, the driver's probe function is called before the new
>> usb_interface is added to the driver's klist_devices.
> 
> and now we obviously no longer care about that klist_devices thing any 
> more, but we _do_ care about 'dev->driver'.
> 
> Has that been set by the time the driver's probe function is called? Or 
> are we now going to have the same situation as before the original patch?
> 
> [ That obviously always worked for my printer situation, but I'm just 
>   wondering if this patch actually now helps whatever problem the original 
>   patch was supposed to help? ]
> 
> Somebody who knows the USB driver binding code better than I do should 
> look at this. Greg?
> 

I'll test tomorrow be sure, but It seems fine. really_probe in
drivers/base/dd.c is setting dev->driver before calling drv->probe.
driver_bound is called after drv->prove which adds the device to the
driver klist_devices.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

  reply	other threads:[~2009-12-15  6:12 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-11 21:26 [GIT PATCH] USB patches for 2.6.33-git Greg KH
2009-12-12  6:59 ` [build failure] " Ingo Molnar
2009-12-12  7:00   ` David Miller
2009-12-12  7:15     ` [PATCH] kaweth: Replace runtime power management primitives Ingo Molnar
2009-12-15  0:39 ` [GIT PATCH] USB patches for 2.6.33-git Linus Torvalds
2009-12-15  0:52   ` Greg KH
2009-12-15  1:00     ` Linus Torvalds
2009-12-15  1:47       ` Linus Torvalds
2009-12-15  2:29         ` Linus Torvalds
2009-12-15  3:09           ` Linus Torvalds
2009-12-15  3:17             ` russ.dill
2009-12-15  4:00               ` Russ Dill
2009-12-15  4:28                 ` Linus Torvalds
2009-12-15  4:44                   ` Linus Torvalds
2009-12-15 14:31                     ` Greg KH
2009-12-15  4:36                 ` Linus Torvalds
2009-12-15  4:45                   ` Russ Dill
2009-12-15  6:02                     ` Linus Torvalds
2009-12-15  6:11                       ` Russ Dill [this message]
2009-12-15  6:20                         ` Linus Torvalds
  -- strict thread matches above, loose matches on Subject: below --
2010-03-02 23:09 Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B2728AC.8050001@gmail.com \
    --to=russ.dill@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=greg@kroah.com \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox