RE: [PARPORT] lp locks with three devs on parport


Tim Waugh (twaugh@matra.co.uk)
Mon, 13 Jul 1998 16:32:08 +0100


> Thread A then runs again unaware of what's happened behind its back.
It sees
> that the port is still in use (not realising that it's now the owner)
and
> commits to going to sleep. It sets bit 0 of `waiting' as well and
goes to
> sleep. Since it now owns the port nobody else can release it and so
we have
> deadlock.

Okay, I see now. I don't think this is happening, though, since not
only is the wait-queue empty but no devices have a "+" next to them in
/proc/.../devices (i.e. no-one has the port). The other devices are
fine.

The trouble with my explanation (need a spinlock around "if (waiting&1)
{ waiting=0;..") is that you'd need two threads messing with a
particular device's "waiting" flags, which I also don't think is
happening.

Also interesting is which device driver stops: it's always been ppuser
for me, and the original poster had it happen twice to lp. I wonder how
the bug chooses its victim..

Tim.
*/

--
Tim Waugh
Matra Systems (UK) Ltd		

Home Farm, Leigh Road, Eastleigh SO50 9EU. Reg in Cardiff: 2642797

-- To unsubscribe, send mail to: linux-parport-request@torque.net -- -- with the single word "unsubscribe" in the body of the message. --



This archive was generated by hypermail 2.0b3 on Wed 30 Dec 1998 - 10:17:57 EST