Re: 2.6.7-mm7

Andrew Morton
2004-07-09T20:04:35Z

Jesse Stockall <stockall@magma.ca> wrote:
>
> On Fri, 2004-07-09 at 14:54, Andrew Morton wrote:
> down_write_trylock(&usb_all_devices_rwsem));
> >
> > That's a bit unusual. Could you (or Alan) please explain the reason for
> > this a little more?
>
> I believe you want this thread
>
> http://marc.theaimsgroup.com/?l=linux-usb-devel&m=108923404032264&w=2

Oh, OK. Recursively taking an rwsem for reading is certainly deadlocky.
The main reason for not supporting this is that heavy down_read() traffic
can trivially livelock down_write() waiters. Alan's patch will introduce
that shortcoming.

Really, it would be better to get the locking sorted out.