[lkp-robot] [confidence: ] e181ae0c5d [ 0.000000] BUG: unable to handle kernel NULL pointer dereference at 00000000

2018-07-20 Thread kernel test robot

Greetings,

0day kernel testing robot got the below dmesg and the first bad commit is

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master

commit e181ae0c5db9544de9c53239eb22bc012ce75033
Author: Pavel Tatashin 
AuthorDate: Sat Jul 14 09:15:07 2018 -0400
Commit: Linus Torvalds 
CommitDate: Sat Jul 14 11:02:20 2018 -0700

mm: zero unavailable pages before memmap init

We must zero struct pages for memory that is not backed by physical
memory, or kernel does not have access to.

Recently, there was a change which zeroed all memmap for all holes in
e820.  Unfortunately, it introduced a bug that is discussed here:

  https://www.spinics.net/lists/linux-mm/msg156764.html

Linus, also saw this bug on his machine, and confirmed that reverting
commit 124049decbb1 ("x86/e820: put !E820_TYPE_RAM regions into
memblock.reserved") fixes the issue.

The problem is that we incorrectly zero some struct pages after they
were setup.

The fix is to zero unavailable struct pages prior to initializing of
struct pages.

A more detailed fix should come later that would avoid double zeroing
cases: one in __init_single_page(), the other one in
zero_resv_unavail().

Fixes: 124049decbb1 ("x86/e820: put !E820_TYPE_RAM regions into 
memblock.reserved")
Signed-off-by: Pavel Tatashin 
Signed-off-by: Linus Torvalds 

2db39a2f49  Merge branch 'i2c/for-current' of 
git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux
e181ae0c5d  mm: zero unavailable pages before memmap init
28c20cc73b  Merge tag 'drm-fixes-2018-07-20' of 
git://anongit.freedesktop.org/drm/drm
89cf553533  Add linux-next specific files for 20180720
+--++++---+
|  | 2db39a2f49 
| e181ae0c5d | 28c20cc73b | next-20180720 |
+--++++---+
| boot_successes   | 77 
| 0  | 24 | 59|
| boot_failures| 0  
| 13 | 0  | 12|
| BUG:unable_to_handle_kernel  | 0  
| 13 ||   |
| Oops:#[##]   | 0  
| 13 ||   |
| EIP:zero_resv_unavail| 0  
| 13 ||   |
| Kernel_panic-not_syncing:Fatal_exception | 0  
| 13 ||   |
| Kernel_panic-not_syncing:Fatal_exception]| 0  
| 13 ||   |
| invoked_oom-killer:gfp_mask=0x   | 0  
| 0  | 0  | 10|
| Mem-Info | 0  
| 0  | 0  | 11|
| Kernel_panic-not_syncing:Out_of_memory_and_no_killable_processes | 0  
| 0  | 0  | 9 |
| BUG:soft_lockup-CPU##stuck_for#s | 0  
| 0  | 0  | 1 |
| EIP:_raw_spin_unlock_irqrestore  | 0  
| 0  | 0  | 1 |
| Kernel_panic-not_syncing:softlockup:hung_tasks   | 0  
| 0  | 0  | 1 |
| Out_of_memory:Kill_process   | 0  
| 0  | 0  | 3 |
+--++++---+

[0.00]   Normal   [mem 0x0100-0x0ffd1fff]
[0.00] Movable zone start for each node
[0.00] Early memory node ranges
[0.00]   node   0: [mem 0x1000-0x0009efff]
[0.00]   node   0: [mem 0x0010-0x0ffd1fff]
[0.00] BUG: unable to handle kernel NULL pointer dereference at 
[0.00] *pde =  
[0.00] Oops: 0002 [#1]
[0.00] CPU: 0 PID: 0 Comm: swapper Not tainted 
4.18.0-rc4-00148-ge181ae0 #2
[0.00] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 
1.10.2-1 04/01/2014
[0.00] EIP: zero_resv_unavail+0x92/0xed
[0.00] Code: 00 00 c1 e9 0c 39 ca 73 2e 89 d1 81 e1 00 fc ff ff 3b 0d 
c8 29 25 82 73 18 8b 3d c4 29 25 82 b9 09 00 00 00 01 df 83 04 24 01  ab 83 
54 24 04 00 42 83 c3 24 eb c1 6a 00 56 31 c9 55 68 48 9a 
[0.00] EAX:  EBX:  ECX: 0009 EDX: 
[0.00] ESI: 819c5ee8 EDI:  

[lkp-robot] [confidence: ] e181ae0c5d [ 0.000000] BUG: unable to handle kernel NULL pointer dereference at 00000000

2018-07-20 Thread kernel test robot

Greetings,

0day kernel testing robot got the below dmesg and the first bad commit is

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master

commit e181ae0c5db9544de9c53239eb22bc012ce75033
Author: Pavel Tatashin 
AuthorDate: Sat Jul 14 09:15:07 2018 -0400
Commit: Linus Torvalds 
CommitDate: Sat Jul 14 11:02:20 2018 -0700

mm: zero unavailable pages before memmap init

We must zero struct pages for memory that is not backed by physical
memory, or kernel does not have access to.

Recently, there was a change which zeroed all memmap for all holes in
e820.  Unfortunately, it introduced a bug that is discussed here:

  https://www.spinics.net/lists/linux-mm/msg156764.html

Linus, also saw this bug on his machine, and confirmed that reverting
commit 124049decbb1 ("x86/e820: put !E820_TYPE_RAM regions into
memblock.reserved") fixes the issue.

The problem is that we incorrectly zero some struct pages after they
were setup.

The fix is to zero unavailable struct pages prior to initializing of
struct pages.

A more detailed fix should come later that would avoid double zeroing
cases: one in __init_single_page(), the other one in
zero_resv_unavail().

Fixes: 124049decbb1 ("x86/e820: put !E820_TYPE_RAM regions into 
memblock.reserved")
Signed-off-by: Pavel Tatashin 
Signed-off-by: Linus Torvalds 

2db39a2f49  Merge branch 'i2c/for-current' of 
git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux
e181ae0c5d  mm: zero unavailable pages before memmap init
28c20cc73b  Merge tag 'drm-fixes-2018-07-20' of 
git://anongit.freedesktop.org/drm/drm
89cf553533  Add linux-next specific files for 20180720
+--++++---+
|  | 2db39a2f49 
| e181ae0c5d | 28c20cc73b | next-20180720 |
+--++++---+
| boot_successes   | 77 
| 0  | 24 | 59|
| boot_failures| 0  
| 13 | 0  | 12|
| BUG:unable_to_handle_kernel  | 0  
| 13 ||   |
| Oops:#[##]   | 0  
| 13 ||   |
| EIP:zero_resv_unavail| 0  
| 13 ||   |
| Kernel_panic-not_syncing:Fatal_exception | 0  
| 13 ||   |
| Kernel_panic-not_syncing:Fatal_exception]| 0  
| 13 ||   |
| invoked_oom-killer:gfp_mask=0x   | 0  
| 0  | 0  | 10|
| Mem-Info | 0  
| 0  | 0  | 11|
| Kernel_panic-not_syncing:Out_of_memory_and_no_killable_processes | 0  
| 0  | 0  | 9 |
| BUG:soft_lockup-CPU##stuck_for#s | 0  
| 0  | 0  | 1 |
| EIP:_raw_spin_unlock_irqrestore  | 0  
| 0  | 0  | 1 |
| Kernel_panic-not_syncing:softlockup:hung_tasks   | 0  
| 0  | 0  | 1 |
| Out_of_memory:Kill_process   | 0  
| 0  | 0  | 3 |
+--++++---+

[0.00]   Normal   [mem 0x0100-0x0ffd1fff]
[0.00] Movable zone start for each node
[0.00] Early memory node ranges
[0.00]   node   0: [mem 0x1000-0x0009efff]
[0.00]   node   0: [mem 0x0010-0x0ffd1fff]
[0.00] BUG: unable to handle kernel NULL pointer dereference at 
[0.00] *pde =  
[0.00] Oops: 0002 [#1]
[0.00] CPU: 0 PID: 0 Comm: swapper Not tainted 
4.18.0-rc4-00148-ge181ae0 #2
[0.00] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 
1.10.2-1 04/01/2014
[0.00] EIP: zero_resv_unavail+0x92/0xed
[0.00] Code: 00 00 c1 e9 0c 39 ca 73 2e 89 d1 81 e1 00 fc ff ff 3b 0d 
c8 29 25 82 73 18 8b 3d c4 29 25 82 b9 09 00 00 00 01 df 83 04 24 01  ab 83 
54 24 04 00 42 83 c3 24 eb c1 6a 00 56 31 c9 55 68 48 9a 
[0.00] EAX:  EBX:  ECX: 0009 EDX: 
[0.00] ESI: 819c5ee8 EDI: