linux-stable/include
Andrey Konovalov ada543af3b mm, kasan: fix __GFP_BITS_SHIFT definition breaking LOCKDEP
KASAN changes that added new GFP flags mistakenly updated
__GFP_BITS_SHIFT as the total number of GFP bits instead of as a shift
used to define __GFP_BITS_MASK.

This broke LOCKDEP, as __GFP_BITS_MASK now gets the 25th bit enabled
instead of the 28th for __GFP_NOLOCKDEP.

Update __GFP_BITS_SHIFT to always count KASAN GFP bits.

In the future, we could handle all combinations of KASAN and LOCKDEP to
occupy as few bits as possible.  For now, we have enough GFP bits to be
inefficient in this quick fix.

Link: https://lkml.kernel.org/r/462ff52742a1fcc95a69778685737f723ee4dfb3.1648400273.git.andreyknvl@google.com
Fixes: 9353ffa6e9 ("kasan, page_alloc: allow skipping memory init for HW_TAGS")
Fixes: 53ae233c30 ("kasan, page_alloc: allow skipping unpoisoning for HW_TAGS")
Fixes: f49d9c5bb1 ("kasan, mm: only define ___GFP_SKIP_KASAN_POISON with HW_TAGS")
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Reported-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Tested-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Marco Elver <elver@google.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
Cc: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2022-04-01 11:46:09 -07:00
..
acpi
asm-generic ptrace: Cleanups for v5.18 2022-03-28 17:29:53 -07:00
clocksource
crypto Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2022-03-21 16:02:36 -07:00
drm
dt-bindings There's one large change in the core clk framework here. We change how 2022-03-30 10:11:04 -07:00
keys
kunit
kvm
linux mm, kasan: fix __GFP_BITS_SHIFT definition breaking LOCKDEP 2022-04-01 11:46:09 -07:00
math-emu
media
memory
misc
net Networking changes for 5.18. 2022-03-24 13:13:26 -07:00
pcmcia
ras mm/memory-failure.c: fix race with changing page compound again 2022-03-22 15:57:07 -07:00
rdma
scsi SCSI misc on 20220324 2022-03-24 19:37:53 -07:00
soc drm for 5.18-rc1 2022-03-24 16:19:43 -07:00
sound flexible-array transformations for 5.18-rc1 2022-03-24 11:39:32 -07:00
target
trace Netfs prep for write helpers 2022-03-31 15:49:36 -07:00
uapi virtio: features, fixes 2022-03-31 13:57:15 -07:00
vdso
video
xen