Re: [PATCH] break_lock forever broken

From: Ingo Molnar
Date: Mon Mar 14 2005 - 02:05:10 EST

* Hugh Dickins <hugh@xxxxxxxxxxx> wrote:

> @@ -187,6 +187,8 @@ void __lockfunc _##op##_lock(locktype##_
> cpu_relax(); \
> preempt_disable(); \
> } \
> + if ((lock)->break_lock) \
> + (lock)->break_lock = 0; \

while writing the ->break_lock feature i intentionally avoided overhead
in the spinlock fastpath. A better solution for the bug you noticed is
to clear the break_lock flag in places that use need_lock_break()

One robust way for that seems to be to make the need_lock_break() macro
clear the flag if it sees it set, and to make all the other (internal)
users use __need_lock_break() that doesnt clear the flag. I'll cook up a
patch for this.

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