lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4B2728AC.8050001@gmail.com>
Date:	Mon, 14 Dec 2009 23:11:56 -0700
From:	Russ Dill <russ.dill@...il.com>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
CC:	Greg KH <greg@...ah.com>, Alan Stern <stern@...land.harvard.edu>,
	Greg KH <gregkh@...e.de>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	linux-usb@...r.kernel.org
Subject: Re: [GIT PATCH] USB patches for 2.6.33-git

Linus Torvalds wrote:
> 
> On Mon, 14 Dec 2009, Russ Dill wrote:
>> From: Russ Dill <Russ.Dill@...il.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.


Download attachment "signature.asc" of type "application/pgp-signature" (261 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ