diff options
author | 2021-06-17 11:56:51 +0206 | |
---|---|---|
committer | 2021-06-22 09:57:15 +0200 | |
commit | 3342aa8e6b4f6e3f1521e9b4cf5cfe50dbc37774 (patch) | |
tree | 40f06e36bcbedf876fa6d3b8b1ebb2713ee7aec7 /scripts/gdb/linux/utils.py | |
parent | lib/dump_stack: move cpu lock to printk.c (diff) | |
download | wireguard-linux-3342aa8e6b4f6e3f1521e9b4cf5cfe50dbc37774.tar.xz wireguard-linux-3342aa8e6b4f6e3f1521e9b4cf5cfe50dbc37774.zip |
printk: fix cpu lock ordering
The cpu lock implementation uses a full memory barrier to take
the lock, but no memory barriers when releasing the lock. This
means that changes performed by a lock owner may not be seen by
the next lock owner. This may have been "good enough" for use
by dump_stack() as a serialization mechanism, but it is not
enough to provide proper protection for a critical section.
Correct this problem by using acquire/release memory barriers
for lock/unlock, respectively.
Signed-off-by: John Ogness <john.ogness@linutronix.de>
Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20210617095051.4808-3-john.ogness@linutronix.de
Diffstat (limited to 'scripts/gdb/linux/utils.py')
0 files changed, 0 insertions, 0 deletions