git: kernel - wakeup() lfence -> mfence
Matthew Dillon
dillon at crater.dragonflybsd.org
Thu Aug 24 22:32:41 PDT 2017
commit 9b302485d4f8583183e666fd23820ad7eb08c968
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date: Thu Aug 24 22:16:34 2017 -0700
kernel - wakeup() lfence -> mfence
* wakeup() needs to use a mfence() before loading from the global cpumasks
array. lfence() is not sufficient.
* Issue arises where the mutex code sets a variable non-atomically and
then calls wakeup(). If the write to the variable is reordered around
wakeup()'s read of the global cpumask, then wakeup() can race the mutex
link wait setup and cause the mutex to stall.
Summary of changes:
sys/kern/kern_synch.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/9b302485d4f8583183e666fd23820ad7eb08c968
--
DragonFly BSD source repository
More information about the Commits
mailing list