summaryrefslogtreecommitdiffstats
path: root/arch/um/kernel
diff options
context:
space:
mode:
authorVincent Whitchurch <vincent.whitchurch@axis.com>2022-09-07 12:05:33 +0200
committerRichard Weinberger <richard@nod.at>2022-09-19 22:58:48 +0200
commit2975e4a282964dd14831e4612ac1b6b10745e5ba (patch)
treec5aa840b7df45e1e8e4bc925a58ca43ef405eeee /arch/um/kernel
parent782b1f70f8a8b28571949d2ba43fe88b96d75ec3 (diff)
downloadlinux-2975e4a282964dd14831e4612ac1b6b10745e5ba.tar.bz2
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')
-rw-r--r--arch/um/kernel/sysrq.c3
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);