Re: [patch 2.6.9] Avoid a rare deadlock during unwind

From: Keith Owens <kaos_at_sgi.com>
Date: 2004-10-22 20:14:26
On Fri, 22 Oct 2004 20:10:08 +1000, 
Keith Owens <kaos@sgi.com> wrote:
>On Fri, 22 Oct 2004 02:27:30 -0700, 
>David Mosberger <davidm@napali.hpl.hp.com> wrote:
>>>>>>> On Fri, 22 Oct 2004 00:44:35 +1000, Keith Owens <kaos@sgi.com> said:
>>  Keith> o if both the unw.lock spinlock and a script's read-write lock must be
>>  Keith> acquired using a method that might sleep, then the read-write lock
>>  Keith> must be acquired first.
>>
>>  Keith> adding "using a method that might sleep".  The only read-write lock
>>  Keith> code under spinlock(unw.lock) is write_trylock(), which never sleeps.
>>  Keith> If you agree with this analysis, then I am happy to update the comment.
>>
>>No, the comment was intending to establish the lock hierarchy.  If there
>>are no other paths where the locks are acquire in the other order, then
>>it's OK.  I'd just reverse the comment to match the (new) reality.
>
>Reversing the comment would also be wrong.  You are not allowed to
>sleep while holding a spinlock.

Ignore that, brain malfunction.  read/write_lock does not sleep.
read_lock != semaphore.

-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Fri Oct 22 06:16:50 2004

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:31 EST