]> granicus.if.org Git - spl/commit
Fix race condition in mutex_exit()
authorGunnar Beutner <gunnar@beutner.name>
Tue, 18 Oct 2011 00:32:50 +0000 (02:32 +0200)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 19 Oct 2011 16:58:41 +0000 (09:58 -0700)
commit3160d4f56bf35492e9c400094f8c1ff2066d4459
tree2b8e0fdfe1842f1671244e12d9c79a42efbb9bae
parentf3989ed3223363330af014062caeeb1afbd0503f
Fix race condition in mutex_exit()

On kernels with CONFIG_DEBUG_MUTEXES mutex_exit() clears the mutex
owner after releasing the mutex. This would cause mutex_owner()
to return an incorrect owner if another thread managed to lock the
mutex before mutex_exit() had a chance to clear the owner.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes ZFS issue #167
include/sys/mutex.h