lkml.org 
[lkml]   [1998]   [Dec]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] disable_bh/enable_bh race fix [Re: Program to freeze keyboard in 2.1.131]


On Sun, 27 Dec 1998, Andrea Arcangeli wrote:
>
> I would like to fix the race reverting completly my last atomic_t patch
> and then adding a start_bh_atomic()/end_bh_atomic() around:

No, your first patch was much better.

Imagine two CPU's doing "disable_bh()" at the same time - neither of them
running in a BH context. In that case start_bh_atomic() will do no locking
at all, and you have the race again.

I agree that the bitop should also be atomic, and the only way to do it
properly is probably with a spinlock. I'll think about it, but in the
meantime your first patch at least means we have some basic consistency.

Linus


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:46    [W:0.080 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site