diff options
| author | Aneesh Kumar K.V <[email protected]> | 2020-06-11 01:41:44 +0000 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2020-06-11 02:14:18 +0000 |
| commit | 787d563b8642f35c561e439ebaf7ee5653437d05 (patch) | |
| tree | 64a1b8c21a9d8bcc655ce73d8e5133475d03baee /lib/test_bitops.c | |
| parent | lib: fix bitmap_parse() on 64-bit big endian archs (diff) | |
| download | kernel-787d563b8642f35c561e439ebaf7ee5653437d05.tar.gz kernel-787d563b8642f35c561e439ebaf7ee5653437d05.zip | |
mm/debug_vm_pgtable: fix kernel crash by checking for THP support
Architectures can have CONFIG_TRANSPARENT_HUGEPAGE enabled but no THP
support enabled based on platforms. For ex: with 4K PAGE_SIZE ppc64
supports THP only with radix translation.
This results in below crash when running with hash translation and 4K
PAGE_SIZE.
kernel BUG at arch/powerpc/include/asm/book3s/64/hash-4k.h:140!
cpu 0x61: Vector: 700 (Program Check) at [c000000ff948f860]
pc: debug_vm_pgtable+0x480/0x8b0
lr: debug_vm_pgtable+0x474/0x8b0
...
debug_vm_pgtable+0x374/0x8b0 (unreliable)
do_one_initcall+0x98/0x4f0
kernel_init_freeable+0x330/0x3fc
kernel_init+0x24/0x148
Check for THP support correctly
Link: http://lkml.kernel.org/r/[email protected]
Fixes: 399145f9eb6c ("mm/debug: add tests validating architecture page table helpers")
Signed-off-by: Aneesh Kumar K.V <[email protected]>
Reviewed-by: Anshuman Khandual <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'lib/test_bitops.c')
0 files changed, 0 insertions, 0 deletions
