syzbot


kernel BUG in remove_inode_hugepages

Status: fixed on 2021/11/10 00:50
Subsystems: fs mm
[Documentation on labels]
Reported-by: syzbot+67654e51e54455f1c585@syzkaller.appspotmail.com
Fix commit: c7b1850dfb41 hugetlb: don't pass page cache pages to restore_reserve_on_error
First crash: 1014d, last: 982d
Cause bisection: introduced by (bisect log) [no-op commit]:
commit b9fc8b4a591811546fec2dbef7e9f809362100c9
Author: Grant Seltzer <grantseltzer@gmail.com>
Date: Mon Feb 22 19:58:46 2021 +0000

  bpf: Add kernel/modules BTF presence checks to bpftool feature command

Crash: WARNING in kvm_wait (log)
Repro: C syz .config
  
Discussions (4)
Title Replies (including bot) Last reply
[PATCH 5.13 000/127] 5.13.13-rc1 review 143 (143) 2021/09/02 13:39
[patch 10/10] hugetlb: don't pass page cache pages to restore_reserve_on_error 1 (1) 2021/08/20 02:04
[PATCH] hugetlb: don't pass page cache pages to restore_reserve_on_error 1 (1) 2021/08/18 21:33
[syzbot] kernel BUG in remove_inode_hugepages 1 (3) 2021/08/18 04:11
Last patch testing requests (1)
Created Duration User Patch Repo Result
2021/08/18 02:36 16m mike.kravetz@oracle.com patch git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git a2824f19e6065a0d3735acd9fe7155b104e7edf5 OK

Sample crash report:
Code: 28 c3 e8 2a 14 00 00 66 2e 0f 1f 84 00 00 00 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffedef26928 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 000000000043f589
RDX: 000000000000effd RSI: 0000000020000680 RDI: 0000000000000003
RBP: 00007ffedef26930 R08: 0000000000000001 R09: 0000000000400034
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000005
R13: 0000000000000000 R14: 00000000004ad018 R15: 0000000000400488
------------[ cut here ]------------
kernel BUG at fs/hugetlbfs/inode.c:532!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 8445 Comm: syz-executor211 Not tainted 5.14.0-rc6-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:remove_inode_hugepages+0x52f/0xa90 fs/hugetlbfs/inode.c:532
Code: ff e8 d5 f2 4c ff 48 89 ef e8 3d c3 70 ff e9 17 ff ff ff e8 c3 f2 4c ff 48 89 ef e8 cb 50 71 ff e9 1a fe ff ff e8 b1 f2 4c ff <0f> 0b e8 aa f2 4c ff 49 83 ed 01 e9 d5 fd ff ff e8 9c f2 4c ff 48
RSP: 0018:ffffc900017afa30 EFLAGS: 00010293
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: ffff888017093880 RSI: ffffffff8228b64f RDI: 0000000000000003
RBP: ffffea0000a48000 R08: 0000000000000000 R09: ffffea0000a4802f
R10: ffffffff8228b4a7 R11: 0000000000000000 R12: 7fffffffffffffff
R13: 0000000000000001 R14: 0000000000000000 R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000004801c0 CR3: 0000000029917000 CR4: 00000000001506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 hugetlbfs_evict_inode+0x1f/0x70 fs/hugetlbfs/inode.c:557
 evict+0x2ed/0x6b0 fs/inode.c:584
 iput_final fs/inode.c:1660 [inline]
 iput.part.0+0x539/0x850 fs/inode.c:1686
 iput+0x58/0x70 fs/inode.c:1676
 dentry_unlink_inode+0x2b1/0x3d0 fs/dcache.c:376
 __dentry_kill+0x3c0/0x640 fs/dcache.c:582
 dentry_kill fs/dcache.c:708 [inline]
 dput+0x73a/0xbc0 fs/dcache.c:888
 __fput+0x3ae/0x920 fs/file_table.c:293
 task_work_run+0xdd/0x1a0 kernel/task_work.c:164
 exit_task_work include/linux/task_work.h:32 [inline]
 do_exit+0xbd4/0x2a60 kernel/exit.c:825
 do_group_exit+0x125/0x310 kernel/exit.c:922
 __do_sys_exit_group kernel/exit.c:933 [inline]
 __se_sys_exit_group kernel/exit.c:931 [inline]
 __x64_sys_exit_group+0x3a/0x50 kernel/exit.c:931
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x43e289
Code: Unable to access opcode bytes at RIP 0x43e25f.
RSP: 002b:00007ffedef26908 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 00000000004af3b0 RCX: 000000000043e289
RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000000
RBP: 0000000000000000 R08: ffffffffffffffc0 R09: 0000000000400034
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000004af3b0
R13: 0000000000000001 R14: 0000000000000000 R15: 0000000000000001
Modules linked in:
---[ end trace b9c8e89a63f407f9 ]---
RIP: 0010:remove_inode_hugepages+0x52f/0xa90 fs/hugetlbfs/inode.c:532
Code: ff e8 d5 f2 4c ff 48 89 ef e8 3d c3 70 ff e9 17 ff ff ff e8 c3 f2 4c ff 48 89 ef e8 cb 50 71 ff e9 1a fe ff ff e8 b1 f2 4c ff <0f> 0b e8 aa f2 4c ff 49 83 ed 01 e9 d5 fd ff ff e8 9c f2 4c ff 48
RSP: 0018:ffffc900017afa30 EFLAGS: 00010293
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: ffff888017093880 RSI: ffffffff8228b64f RDI: 0000000000000003
RBP: ffffea0000a48000 R08: 0000000000000000 R09: ffffea0000a4802f
R10: ffffffff8228b4a7 R11: 0000000000000000 R12: 7fffffffffffffff
R13: 0000000000000001 R14: 0000000000000000 R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000004801c0 CR3: 0000000029917000 CR4: 00000000001506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	28 c3                	sub    %al,%bl
   2:	e8 2a 14 00 00       	callq  0x1431
   7:	66 2e 0f 1f 84 00 00 	nopw   %cs:0x0(%rax,%rax,1)
   e:	00 00 00 
  11:	48 89 f8             	mov    %rdi,%rax
  14:	48 89 f7             	mov    %rsi,%rdi
  17:	48 89 d6             	mov    %rdx,%rsi
  1a:	48 89 ca             	mov    %rcx,%rdx
  1d:	4d 89 c2             	mov    %r8,%r10
  20:	4d 89 c8             	mov    %r9,%r8
  23:	4c 8b 4c 24 08       	mov    0x8(%rsp),%r9
  28:	0f 05                	syscall 
  2a:	48 3d 01 f0 ff ff    	cmp    $0xfffffffffffff001,%rax <-- trapping instruction
  30:	73 01                	jae    0x33
  32:	c3                   	retq   
  33:	48 c7 c1 c0 ff ff ff 	mov    $0xffffffffffffffc0,%rcx
  3a:	f7 d8                	neg    %eax
  3c:	64 89 01             	mov    %eax,%fs:(%rcx)
  3f:	48                   	rex.W

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/08/17 02:06 upstream a2824f19e606 33c26cb7 .config console log report syz C ci-upstream-kasan-gce kernel BUG in remove_inode_hugepages
2021/08/17 01:48 upstream a2824f19e606 33c26cb7 .config console log report info ci-upstream-kasan-gce kernel BUG in remove_inode_hugepages
2021/07/15 21:31 upstream 8096acd7442e b9a2f64e .config console log report info ci-upstream-kasan-gce-selinux-root kernel BUG in remove_inode_hugepages
* Struck through repros no longer work on HEAD.