linux/arch/openrisc/kernel
Mark Rutland 4ea7ce0a79 openrisc: Snapshot thread flags
Some thread flags can be set remotely, and so even when IRQs are disabled,
the flags can change under our feet. Generally this is unlikely to cause a
problem in practice, but it is somewhat unsound, and KCSAN will
legitimately warn that there is a data race.

To avoid such issues, a snapshot of the flags has to be taken prior to
using them. Some places already use READ_ONCE() for that, others do not.

Convert them all to the new flag accessor helpers.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Stafford Horne <shorne@gmail.com>
Acked-by: Paul E. McKenney <paulmck@kernel.org>
Cc: Jonas Bonn <jonas@southpole.se>
Cc: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
Link: https://lore.kernel.org/r/20211129130653.2037928-9-mark.rutland@arm.com
2021-12-01 00:06:44 +01:00
..
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
asm-offsets.c sched,arch: Remove unused TASK_STATE offsets 2021-06-18 11:43:09 +02:00
dma.c openrisc: fix SMP tlb flush NULL pointer dereference 2021-11-03 20:48:29 +09:00
entry.S irq: openrisc: perform irqentry in entry code 2021-10-26 10:13:28 +01:00
head.S openrisc: rename or32 code & comments to or1k 2021-08-05 10:53:59 +09:00
irq.c irq: openrisc: perform irqentry in entry code 2021-10-26 10:13:28 +01:00
Makefile OpenRISC updates for v4.15 2017-11-13 12:12:00 -08:00
module.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
or32_ksyms.c mm: remove unneeded includes of <asm/pgalloc.h> 2020-08-07 11:33:26 -07:00
process.c sched: Add wrapper for get_wchan() to keep task blocked 2021-10-15 11:25:14 +02:00
prom.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
ptrace.c openrisc: switch to ->regset_get() 2020-07-27 14:31:10 -04:00
setup.c openrisc: Fix compiler warnings in setup 2021-08-11 06:14:23 +09:00
signal.c openrisc: Snapshot thread flags 2021-12-01 00:06:44 +01:00
smp.c OpenRISC updates for 5.16 2021-11-08 09:31:25 -08:00
stacktrace.c openrisc: Fix oops caused when dumping stack 2020-08-04 10:59:45 +09:00
sync-timer.c openrisc: add tick timer multi-core sync logic 2017-11-03 14:01:16 +09:00
sys_call_table.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
time.c openrisc: time: don't mark comment as kernel-doc 2021-10-02 21:42:28 +09:00
traps.c exit: Remove calls of do_exit after noreturn versions of die 2021-10-20 13:09:47 -05:00
unwinder.c openrisc: support framepointers and STACKTRACE_SUPPORT 2017-11-03 14:01:15 +09:00
vmlinux.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
vmlinux.lds.S Orphan link sections were a long-standing source of obscure bugs, 2020-10-12 13:39:19 -07:00