mirror of https://github.com/torvalds/linux.git
There are several places in the kernel where wait_on_bit is not followed by a memory barrier (for example, in drivers/md/dm-bufio.c:new_read). On architectures with weak memory ordering, it may happen that memory accesses that follow wait_on_bit are reordered before wait_on_bit and they may return invalid data. Fix this class of bugs by introducing a new function "test_bit_acquire" that works like test_bit, but has acquire memory ordering semantics. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Acked-by: Will Deacon <will@kernel.org> Cc: stable@vger.kernel.org Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> |
||
|---|---|---|
| .. | ||
| __ffs.h | ||
| __fls.h | ||
| arch_hweight.h | ||
| atomic.h | ||
| builtin-__ffs.h | ||
| builtin-__fls.h | ||
| builtin-ffs.h | ||
| builtin-fls.h | ||
| const_hweight.h | ||
| ext2-atomic-setbit.h | ||
| ext2-atomic.h | ||
| ffs.h | ||
| ffz.h | ||
| fls.h | ||
| fls64.h | ||
| generic-non-atomic.h | ||
| hweight.h | ||
| instrumented-atomic.h | ||
| instrumented-lock.h | ||
| instrumented-non-atomic.h | ||
| le.h | ||
| lock.h | ||
| non-atomic.h | ||
| non-instrumented-non-atomic.h | ||
| sched.h | ||