Subject: Re: [next] next-20220412: BUG: Bad page map in process oom_reaper pte

From: Andrew Morton <[email-masked]>
Date: Tue, 12 Apr 2022 14:03:56 -0700

On Tue, 12 Apr 2022 17:56:42 +0530 Naresh Kamboju <[email-masked]> wrote:

> Linux next-20220412 i386 LTP mm test case caused following kernel crash
> however, test runs to complete successfully.
> 
> ...
>
> [  951.985382] __swap_info_get: Bad swap file entry 6c0373b6
> [  951.986163] BUG: Bad page map in process oom_reaper  pte:06e76c3e
> pmd:0583f067
> [  951.987098] addr:77da7000 vm_flags:00100073 anon_vma:c4e22c40
> mapping:00000000 index:77da7
> [  951.988163] file:(null) fault:0x0 mmap:0x0 readpage:0x0
> [  951.988850] CPU: 2 PID: 36 Comm: oom_reaper Tainted: G        W
>     5.18.0-rc2-next-20220412 #1
> [  951.990034] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996),
> BIOS 1.12.0-1 04/01/2014
> [  951.991101] Call Trace:
> [  951.991457]  dump_stack_lvl+0x44/0x57
> [  951.991942]  dump_stack+0xd/0x10
> [  951.992371]  print_bad_pte.cold+0x82/0xd9
> [  951.992901]  ? free_swap_and_cache+0x2e/0xe0
> [  951.993475]  unmap_page_range+0x6b5/0x790
> [  951.994005]  __oom_reap_task_mm+0xc0/0x140
> [  951.994539]  ? _raw_spin_lock_irqsave+0x28/0x70
> [  951.995128]  ? trace_preempt_on+0x8/0xe0
> [  951.995645]  oom_reaper+0x28c/0x3d0
> [  951.996103]  ? __kthread_parkme+0x37/0x80
> [  951.996626]  ? trace_preempt_on+0x29/0xe0
> [  951.997205]  ? __kthread_parkme+0x37/0x80
> [  951.997723]  ? nsec_high+0xa0/0xa0
> [  951.998174]  kthread+0xe0/0x110
> [  951.998588]  ? __oom_reap_task_mm+0x140/0x140
> [  951.999154]  ? kthread_complete_and_exit+0x20/0x20
> [  951.999771]  ret_from_fork+0x1c/0x28
> [  952.000258] Disabling lock debugging due to kernel taint
> [  952.000951] __swap_info_get: Bad swap file entry 6c0373b7
> [  952.001779] BUG: Bad page map in process oom_reaper  pte:06e76e3e
> pmd:0583f067
> [  952.002827] addr:77da8000 vm_flags:00100073 anon_vma:c4e22c40
> mapping:00000000 index:77da8
> [  952.004010] file:(null) fault:0x0 mmap:0x0 readpage:0x0
> [  952.004764] CPU: 2 PID: 36 Comm: oom_reaper Tainted: G    B   W
>     5.18.0-rc2-next-20220412 #1
> [  952.006060] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996),
> BIOS 1.12.0-1 04/01/2014
> [  952.007248] Call Trace:
> [  952.007611]  dump_stack_lvl+0x44/0x57
> [  952.008142]  dump_stack+0xd/0x10
> [  952.008614]  print_bad_pte.cold+0x82/0xd9
> [  952.009225]  ? free_swap_and_cache+0x2e/0xe0
> [  952.009848]  unmap_page_range+0x6b5/0x790
> [  952.010432]  __oom_reap_task_mm+0xc0/0x140
> [  952.011219]  ? _raw_spin_lock_irqsave+0x28/0x70
> [  952.011863]  ? trace_preempt_on+0x8/0xe0
> [  952.012470]  oom_reaper+0x28c/0x3d0
> [  952.013048]  ? __kthread_parkme+0x37/0x80
> [  952.013628]  ? trace_preempt_on+0x29/0xe0
> [  952.014202]  ? __kthread_parkme+0x37/0x80
> [  952.014774]  ? nsec_high+0xa0/0xa0
> [  952.015265]  kthread+0xe0/0x110
> [  952.015716]  ? __oom_reap_task_mm+0x140/0x140
> [  952.016336]  ? kthread_complete_and_exit+0x20/0x20
> [  952.017035]  ret_from_fork+0x1c/0x28
> [  952.017547] __swap_info_get: Bad swap file entry 6c0373b8
> [  952.018368] BUG: Bad page map in process oom_reaper  pte:06e7703e
> pmd:0583f067
> 
> 
> Reported-by: Linux Kernel Functional Testing <[email-masked]>

I wonder if this could be 859a85ddf90e714092de again.  But the timing
seems wrong.

It seems repeatable.  Is it possible to run a bisection search please?