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/