]> git.baikalelectronics.ru Git - kernel.git/commit
mm/large system hash: avoid possible NULL deref in alloc_large_system_hash
authorEric Dumazet <edumazet@google.com>
Fri, 5 Nov 2021 20:39:59 +0000 (13:39 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 6 Nov 2021 20:30:37 +0000 (13:30 -0700)
commit7b88c99fe769ebee86226a41ea13d012bbe9d4fd
treea938f200a844765a359ffbe5783b0eba4e7c2fdd
parenta136ed213b61ce93b190410ed0df81fa64ab44c4
mm/large system hash: avoid possible NULL deref in alloc_large_system_hash

If __vmalloc() returned NULL, is_vm_area_hugepages(NULL) will fault if
CONFIG_HAVE_ARCH_HUGE_VMALLOC=y

Link: https://lkml.kernel.org/r/20210915212530.2321545-1-eric.dumazet@gmail.com
Fixes: ba43e7c50dbd ("mm/vmalloc: hugepage vmalloc mappings")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/page_alloc.c