diff options
author | Sebastian Andrzej Siewior <[email protected]> | 2021-08-19 21:30:30 +0200 |
---|---|---|
committer | Thomas Gleixner <[email protected]> | 2021-08-20 12:15:54 +0200 |
commit | b857174e68e26f9c4f0796971e11eb63ad5a3eb6 (patch) | |
tree | 009dd241c14645e5ec8bc14d2ef6e8fa23b80dbb /scripts/gdb/linux/timerlist.py | |
parent | 9ae6ab27f44ee0da47520011afc04218f90e8b12 (diff) |
locking/ww_mutex: Initialize waiter.ww_ctx properly
The consolidation of the debug code for mutex waiter intialization sets
waiter::ww_ctx to a poison value unconditionally. For regular mutexes this
is intended to catch the case where waiter_ww_ctx is dereferenced
accidentally.
For ww_mutex the poison value has to be overwritten either with a context
pointer or NULL for ww_mutexes without context.
The rework broke this as it made the store conditional on the context
pointer instead of the argument which signals whether ww_mutex code should
be compiled in or optiized out. As a result waiter::ww_ctx ends up with the
poison pointer for contextless ww_mutexes which causes a later dereference of
the poison pointer because it is != NULL.
Use the build argument instead so for ww_mutex the poison value is always
overwritten.
Fixes: c0afb0ffc06e6 ("locking/ww_mutex: Gather mutex_waiter initialization")
Reported-by: Guenter Roeck <[email protected]>
Suggested-by: Peter Zijlstra <[email protected]>
Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'scripts/gdb/linux/timerlist.py')
0 files changed, 0 insertions, 0 deletions