aboutsummaryrefslogtreecommitdiffstats
path: root/lib/test_printf.c
diff options
context:
space:
mode:
authorJohn Ogness <[email protected]>2021-06-17 09:50:51 +0000
committerPetr Mladek <[email protected]>2021-06-22 07:57:15 +0000
commit3342aa8e6b4f6e3f1521e9b4cf5cfe50dbc37774 (patch)
tree40f06e36bcbedf876fa6d3b8b1ebb2713ee7aec7 /lib/test_printf.c
parentlib/dump_stack: move cpu lock to printk.c (diff)
downloadkernel-3342aa8e6b4f6e3f1521e9b4cf5cfe50dbc37774.tar.gz
kernel-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 <[email protected]> Reviewed-by: Sergey Senozhatsky <[email protected]> Reviewed-by: Petr Mladek <[email protected]> Signed-off-by: Petr Mladek <[email protected]> Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'lib/test_printf.c')
0 files changed, 0 insertions, 0 deletions