Subject: Re: [5.9.0-rc5-20200914] Kernel crash while running LTP(mlock201)

From: Michael Ellerman <[email-masked]>
Date: Tue, 15 Sep 2020 21:24:38 +1000

Sachin Sant <[email-masked]> writes:
> While running LTP tests (specifically mlock201) against next-20200914 tree
> on a POWER9 LPAR results in following crash.

Looks the same as:

https://lore.kernel.org/linux-mm/20200914085545.GB28738@shao2-debian/

cheers

> BUG: Kernel NULL pointer dereference on read at 0x00000000
> Faulting instruction address: 0xc000000000454248
> Oops: Kernel access of bad area, sig: 11 [#1]
> LE PAGE_SIZE=64K MMU=Hash SMP NR_CPUS=2048 NUMA pSeries
> Modules linked in: af_packet(E) nft_ct(E) nf_conntrack(E) nf_defrag_ipv6(E) nf_defrag_ipv4(E) libcrc32c(E) ip6_tables(E) nft_compat(E) ip_set(E) rfkill(E) nf_tables(E) nfnetlink(E) vmx_crypto(E) uio_pdrv_genirq(E) gf128mul(E) uio(E) rtc_generic(E) crct10dif_vpmsum(E) sch_fq_codel(E) ip_tables(E) x_tables(E) ext4(E) crc16(E) mbcache(E) jbd2(E) sd_mod(E) t10_pi(E) sg(E) ibmvscsi(E) scsi_transport_srp(E) scsi_mod(E) ibmveth(E) crc32c_vpmsum(E) dm_mirror(E) dm_region_hash(E) dm_log(E) dm_mod(E) autofs4(E)
> CPU: 11 PID: 26435 Comm: mlock201 Tainted: G            E     5.9.0-rc5-next-20200914-281.gf529200-default #1
> NIP:  c000000000454248 LR: c000000000445a74 CTR: c000000000413150
> REGS: c0000008e645b770 TRAP: 0300   Tainted: G            E      (5.9.0-rc5-next-20200914-281.gf529200-default)
> MSR:  8000000000009033 <SF,EE,ME,IR,DR,RI,LE>  CR: 28002482  XER: 20040000
> CFAR: c00000000000fbb0 DAR: 0000000000000000 DSISR: 40000000 IRQMASK: 0 
> GPR00: c000000000445a74 c0000008e645ba00 c0000000017c4500 0000000000000000 
> GPR04: 0000000000000001 c0000008ea109e98 c0000008f0c40000 0000000000000000 
> GPR08: 0000000000000000 0000000000000000 0000000000000000 0000000000000003 
> GPR12: c000000000413150 c00000001ec70200 0000000000000000 c000000001502038 
> GPR16: 00007fff9c61ffff 00007fff9c61ffff 00007fff9c61ffff c000000000cb02f8 
> GPR20: 00007fff9c5c0000 00007fff9c620000 c0000008e645bcd8 c0000008f0c40000 
> GPR24: c00c0000023c0d00 fffffffffffffe7f 0000000000000000 c0000008f0c40000 
> GPR28: c0000008ea109e98 0000000000000001 c0000008ea9288a8 0000000000000000 
> NIP [c000000000454248] PageHuge+0x8/0x60
> LR [c000000000445a74] find_get_incore_page+0x114/0x160
> Call Trace:
> [c0000008e645ba00] [c000000000445994] find_get_incore_page+0x34/0x160 (unreliable)
> [c0000008e645ba40] [c000000000412e54] mincore_page+0x24/0x160
> [c0000008e645ba70] [c000000000413020] __mincore_unmapped_range+0x90/0x160
> [c0000008e645bac0] [c000000000413680] mincore_pte_range+0x530/0x5d0
> [c0000008e645bb40] [c000000000422a38] walk_pgd_range+0x4e8/0xae0
> [c0000008e645bc30] [c0000000004230c4] __walk_page_range+0x94/0x250
> [c0000008e645bcb0] [c0000000004233d8] walk_page_range+0x158/0x1e0
> [c0000008e645bd40] [c00000000041386c] sys_mincore+0x14c/0x370
> [c0000008e645bdc0] [c000000000033eb8] system_call_exception+0xf8/0x200
> [c0000008e645be20] [c00000000000d140] system_call_common+0xf0/0x27c
> Instruction dump:
> e8410018 38210020 e8010010 7c0803a6 4e800020 60000000 3d400001 7d435378 
> 4e800020 60000000 7c0802a6 60000000 <e9230000> 75290001 40820010 e9230008 
> ---[ end trace 357eb14a3b22eab2 ]—
>
>
> The function find_get_incore_page() was introduced with 
> 3fcbe4eb49a0406e6202e8c8c3560f30965a8e79 
>
> mm: factor find_get_incore_page out of mincore_page
>
>
> Thanks
> -Sachin