Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Vincent Whitchurch and committed by
Richard Weinberger
2975e4a2 782b1f70

+2 -1
+2 -1
arch/um/kernel/sysrq.c
··· 48 48 break; 49 49 if (i && ((i % STACKSLOTS_PER_LINE) == 0)) 50 50 pr_cont("\n"); 51 - pr_cont(" %08lx", *stack++); 51 + pr_cont(" %08lx", READ_ONCE_NOCHECK(*stack)); 52 + stack++; 52 53 } 53 54 54 55 printk("%sCall Trace:\n", loglvl);