mirror of
https://github.com/opnsense/src.git
synced 2026-03-28 21:53:16 -04:00
Clear owner after dropping mutex
It's important to clear mp->owner after calling mutex_unlock() because when CONFIG_DEBUG_MUTEXES is defined the mutex owner is verified in mutex_unlock(). If we set it to NULL this check fails and the lockdep support is immediately disabled.
This commit is contained in:
parent
23aa63cbf5
commit
8294c69bb7
1 changed files with 2 additions and 2 deletions
|
|
@ -81,8 +81,8 @@ mutex_owned(kmutex_t *mp)
|
|||
#ifdef CONFIG_DEBUG_MUTEXES
|
||||
# define mutex_exit(mp) \
|
||||
({ \
|
||||
(mp)->owner = NULL; \
|
||||
mutex_unlock(mp); \
|
||||
mutex_unlock(mp); \
|
||||
(mp)->owner = NULL; \
|
||||
})
|
||||
#else
|
||||
# define mutex_exit(mp) mutex_unlock(mp)
|
||||
|
|
|
|||
Loading…
Reference in a new issue