lkml.org 
[lkml]   [2003]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [linux-usb-devel] Re: [OOPS, usbcore, releaseintf] 2.6.0-test10-mm1
Date
> > Hi Oliver, I agree, except that there are several layers of locking:
> > dev->serialize but also the bus rwsem. So does "physical" mean no
> > subsys.rwsem or no dev->serialize or both?
>
> "physical" means no locking at all. It's the caller's responsibility.
...

> That's what the core cares about. No probe() while a reset is in
> progress. Taking the semaphore ensures that.

Hi Oliver, I'm a bit confused about the locking rules. I suppose

(1) If both subsys.rwsem and dev->serialize are taken, then
subsys.rwsem must be taken first.

(2) dev->serialize atomizes changes to the struct usb_device.

Why then is dev->serialize not taken in usb_reset_device
(except in a dud code path)?

Also, why isn't dev->serialize enough to protect against
probe() during usb_reset_device? After all, won't
dev->serialize be held during the probe calls (I didn't
check this and I'm in need of coffee - I hope I'm on the
right planet...)

Ciao,

Duncan.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:59    [W:0.119 / U:11.688 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site