linux_dsm_epyc7002/kernel/printk
John Ogness ce003d67ad printk: ringbuffer: fix setting state in desc_read()
It is expected that desc_read() will always set at least the
@state_var field. However, if the descriptor is in an inconsistent
state, no fields are set.

Also, the second load of @state_var is not stored in @desc_out and
so might not match the state value that is returned.

Always set the last loaded @state_var into @desc_out, regardless of
the descriptor consistency.

Fixes: b6cf8b3f33 ("printk: add lockless ringbuffer")
Signed-off-by: John Ogness <john.ogness@linutronix.de>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20200914094803.27365-1-john.ogness@linutronix.de
2020-09-15 14:23:37 +02:00
..
braille.c printk: Replace strncmp() with str_has_prefix() 2019-08-16 09:54:08 +02:00
braille.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
console_cmdline.h printk: Fix preferred console selection with multiple matches 2020-02-18 09:34:42 +01:00
internal.h printk: Prepare for nested printk_nmi_enter() 2020-05-19 15:51:16 +02:00
Makefile printk: add lockless ringbuffer 2020-07-10 08:48:19 +02:00
printk_ringbuffer.c printk: ringbuffer: fix setting state in desc_read() 2020-09-15 14:23:37 +02:00
printk_ringbuffer.h printk: ringbuffer: support dataless records 2020-09-08 09:32:59 +02:00
printk_safe.c One more printk change for 5.8 2020-06-12 12:13:36 -07:00
printk.c printk: use the lockless ringbuffer 2020-07-10 08:48:55 +02:00