summaryrefslogtreecommitdiffstats
path: root/lib/test_printf.c
diff options
context:
space:
mode:
authorJohn Ogness <john.ogness@linutronix.de>2021-06-17 11:56:51 +0206
committerPetr Mladek <pmladek@suse.com>2021-06-22 09:57:15 +0200
commit3342aa8e6b4f6e3f1521e9b4cf5cfe50dbc37774 (patch)
tree40f06e36bcbedf876fa6d3b8b1ebb2713ee7aec7 /lib/test_printf.c
parent766c268bc6d39b8124e50d075a36b8a3305bc8e2 (diff)
downloadlinux-3342aa8e6b4f6e3f1521e9b4cf5cfe50dbc37774.tar.bz2
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 'lib/test_printf.c')
0 files changed, 0 insertions, 0 deletions