fix for "kasan, fork: reset pointer tags of vmapped stacks"
authorAndrey Konovalov <andreyknvl@google.com>
Mon, 28 Feb 2022 23:06:04 +0000 (10:06 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 1 Mar 2022 09:31:44 +0000 (20:31 +1100)
commitb7a79dea1bc05aeaf72f11db184a4ef706eb0cad
tree52904f7e5f4606a4abbce78c5a3747dbbd2cb9c3
parent42de8e038e3e9828069da9fde3653091dccfef64
fix for "kasan, fork: reset pointer tags of vmapped stacks"

That patch didn't update the case when a stack is retrieved from
cached_stacks in alloc_thread_stack_node().  As cached_stacks stores
vm_structs and not stack pointers themselves, the pointer tag needs to be
reset there as well.

Link: https://lkml.kernel.org/r/f50c5f96ef896d7936192c888b0c0a7674e33184.1644943792.git.andreyknvl@google.com
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Reviewed-by: Marco Elver <elver@google.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Evgenii Stepanov <eugenis@google.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Peter Collingbourne <pcc@google.com>
Cc: Vincenzo Frascino <vincenzo.frascino@arm.com>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
kernel/fork.c