HomeFreeBSD

Fix race condition in mutex_exit()

Description

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

Details

Provenance
Gunnar Beutner <gunnar@beutner.name>Authored on Oct 18 2011, 12:32 AM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Oct 19 2011, 4:58 PM
Parents
rGf3989ed32233: vn_rdwr() didn't properly advance the file position
Branches
Unknown
Tags
Unknown