Re: [PATCH] break_lock forever broken

From: Ingo Molnar (mingo_at_elte.hu)
Date: 03/14/05

  • Next message: Steve French: "Re: Fw: [CIFS] Add support for updating Windows NT times/dates (part 1)"
    Date:	Mon, 14 Mar 2005 08:02:30 +0100
    To: Hugh Dickins <hugh@veritas.com>
    
    

    * Hugh Dickins <hugh@veritas.com> 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()
    explicitly.

    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.

            Ingo
    -
    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/


  • Next message: Steve French: "Re: Fw: [CIFS] Add support for updating Windows NT times/dates (part 1)"