Messages in this thread | | | Date | Sun, 27 Dec 1998 11:05:18 -0800 (PST) | From | Linus Torvalds <> | Subject | Re: [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/
| |