Skip to content

Commit

Permalink
HBSD: Properly perform the write memory barrier
Browse files Browse the repository at this point in the history
As reported by Alan Cox, Emmanuel Vadot's use and placing of wmb() was
incorrect. Use the more appropriate function atomic_thread_fence_rel()
at the more appropriate place.

Signed-off-by:	Shawn Webb <shawn.webb@hardenedbsd.org>
  • Loading branch information
lattera committed Aug 5, 2020
1 parent 4a6914c commit e7ee745
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sys/compat/linuxkpi/common/include/linux/bitops.h
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,8 @@ find_next_zero_bit(const unsigned long *addr, unsigned long size,
static inline void
clear_bit_unlock(long bit, volatile unsigned long *var)
{
atomic_thread_fence_rel();
clear_bit(bit, var);
wmb();
}

static inline int
Expand Down

0 comments on commit e7ee745

Please sign in to comment.