]> www.infradead.org Git - users/willy/linux.git/commit
kasan: Fix tag for large allocations when using CONFIG_SLAB
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Fri, 1 Oct 2021 02:31:48 +0000 (22:31 -0400)
committerMatthew Wilcox (Oracle) <willy@infradead.org>
Sun, 3 Oct 2021 10:56:47 +0000 (06:56 -0400)
commit030952377ac0a84a2bbe1ef78f10b4d242db38ed
tree670a06f7e084b94aae9b1dc01fea7fcbfc4d9d0b
parentfaaf30ec6cf4c81425900c09e8bb59fb38435172
kasan: Fix tag for large allocations when using CONFIG_SLAB

If an object is allocated on a tail page of a multi-page slab, kasan
will get the wrong tag because page->s_mem is NULL for tail pages.
I'm not quite sure what the user-visible effect of this might be.

Fixes: 7f94ffbc4c6a ("kasan: add hooks implementation for tag-based mode")
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
mm/kasan/common.c