diff options
author | Vincent Whitchurch <vincent.whitchurch@axis.com> | 2022-09-07 12:05:33 +0200 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2022-09-19 22:58:48 +0200 |
commit | 2975e4a282964dd14831e4612ac1b6b10745e5ba (patch) | |
tree | c5aa840b7df45e1e8e4bc925a58ca43ef405eeee /arch/um/kernel/sysrq.c | |
parent | um: fix default console kernel parameter (diff) | |
download | linux-2975e4a282964dd14831e4612ac1b6b10745e5ba.tar.xz linux-2975e4a282964dd14831e4612ac1b6b10745e5ba.zip |
um: Prevent KASAN splats in dump_stack()
Use READ_ONCE_NOCHECK() when reading the stack to prevent KASAN splats
when dump_stack() is used.
Fixes: 5b301409e8bc5d7fad ("UML: add support for KASAN under x86_64")
Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com>
Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/um/kernel/sysrq.c')
-rw-r--r-- | arch/um/kernel/sysrq.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/um/kernel/sysrq.c b/arch/um/kernel/sysrq.c index 7452f70d50d0..746715379f12 100644 --- a/arch/um/kernel/sysrq.c +++ b/arch/um/kernel/sysrq.c @@ -48,7 +48,8 @@ void show_stack(struct task_struct *task, unsigned long *stack, break; if (i && ((i % STACKSLOTS_PER_LINE) == 0)) pr_cont("\n"); - pr_cont(" %08lx", *stack++); + pr_cont(" %08lx", READ_ONCE_NOCHECK(*stack)); + stack++; } printk("%sCall Trace:\n", loglvl); |