Re: [PATCH 1/9] USB usbfs: take a reference to the usb device

From: Greg KH
Date: Fri Apr 23 2004 - 18:19:48 EST

On Wed, Apr 14, 2004 at 12:29:26PM +0200, Duncan Sands wrote:
> Hi Greg, this is the first of a series of patches that replace the
> per-file semaphore ps->devsem with the per-device semaphore
> ps->dev->serialize. The role of devsem was to protect against
> device disconnection. This can be done equally well using
> ps->dev->serialize. On the other hand, ps->dev->serialize
> protects against configuration and other changes, and has
> already been introduced into usbfs in several places. Using
> just one semaphore simplifies the code and removes some
> remaining race conditions. It should also fix the oopses some
> people have been seeing. In this first patch, a reference is
> taken to the usb device as long as the usbfs file is open. That
> way we can use ps->dev->serialize for as long as ps exists.

Nice, I've applied all 9 patches here (with the updated patch 8
version). Feel free to send me an update for the warning issue you and
Oliver talked about if you want to.


greg k-h
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at