syzbot


BUG: Bad page state

Status: auto-closed as invalid on 2022/03/21 10:57
Reported-by: syzbot+f1e69a9544e358ee87ef@syzkaller.appspotmail.com
First crash: 883d, last: 883d
Similar bugs (15)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream BUG: Bad page state (3) usb C 3 2297d 2304d 4/26 fixed on 2018/02/02 04:39
linux-4.14 BUG: Bad page state C 9 426d 568d 0/1 upstream: reported C repro on 2022/10/03 07:33
upstream BUG: Bad page state (5) mm C 171 1882d 1895d 0/26 closed as invalid on 2019/02/27 20:53
linux-4.19 BUG: Bad page state (2) 1 694d 694d 0/1 auto-obsoleted due to no activity on 2022/09/26 19:49
upstream BUG: Bad page state (7) mm 3 1332d 1389d 0/26 auto-closed as invalid on 2020/12/28 02:44
linux-6.1 BUG: Bad page state origin:upstream C 63 16h25m 331d 0/3 upstream: reported C repro on 2023/05/27 10:10
linux-4.19 BUG: Bad page state (3) C error 1 568d 568d 0/1 upstream: reported C repro on 2022/10/02 20:53
android-49 BUG: Bad page state 3 1664d 1688d 0/3 auto-closed as invalid on 2020/01/30 18:48
android-54 BUG: Bad page state C 9 1485d 1516d 0/2 auto-obsoleted due to no activity on 2022/08/26 22:10
upstream BUG: Bad page state (2) crypto 1 2339d 2335d 0/26 closed as invalid on 2017/12/06 12:57
upstream BUG: Bad page state (4) sound 1 2101d 2101d 0/26 closed as invalid on 2018/09/05 12:51
upstream BUG: Bad page state (6) mm C 2 1880d 1880d 0/26 closed as invalid on 2019/03/01 18:38
upstream BUG: Bad page state C 2 2442d 2443d 3/26 fixed on 2017/10/24 06:54
linux-5.15 BUG: Bad page state origin:upstream C error 33 1d10h 372d 0/3 upstream: reported C repro on 2023/04/16 11:16
upstream BUG: Bad page state (8) jfs mm C 7389 1h41m 1176d 1/26 upstream: reported C repro on 2021/02/01 10:07

Sample crash report:
BTRFS info (device loop1): read error corrected: ino 0 off 30609408 (dev /dev/loop1 sector 76168)
BTRFS info (device loop1): read error corrected: ino 0 off 30613504 (dev /dev/loop1 sector 76176)
BTRFS info (device loop1): read error corrected: ino 0 off 30617600 (dev /dev/loop1 sector 76184)
BTRFS warning (device loop1): page private not zero on page 22040576
BUG: Bad page state in process syz-executor.1  pfn:3a6e1
page:ffffea0000e9b840 count:0 mapcount:0 mapping:0000000000000000 index:0x1505
flags: 0xfff00000000009(locked|uptodate)
raw: 00fff00000000009 dead000000000100 dead000000000200 0000000000000000
raw: 0000000000001505 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: PAGE_FLAGS_CHECK_AT_FREE flag(s) set
bad because of flags: 0x1(locked)
Modules linked in:
CPU: 0 PID: 16364 Comm: syz-executor.1 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x1fc/0x2ef lib/dump_stack.c:118
 bad_page.cold+0xdb/0x100 mm/page_alloc.c:571
 free_pages_check mm/page_alloc.c:955 [inline]
 free_pages_prepare mm/page_alloc.c:1045 [inline]
 free_pcp_prepare mm/page_alloc.c:1070 [inline]
 free_unref_page_prepare+0x483/0x5d0 mm/page_alloc.c:2763
 free_unref_page+0x20/0x170 mm/page_alloc.c:2812
 __put_single_page mm/swap.c:80 [inline]
 __put_page+0xcc/0x3a0 mm/swap.c:114
 put_page include/linux/mm.h:963 [inline]
 page_cache_free_page.isra.0+0x36c/0x450 mm/filemap.c:282
 delete_from_page_cache_batch+0x7bc/0xcc0 mm/filemap.c:388
 truncate_inode_pages_range+0x554/0x1b00 mm/truncate.c:365
 evict_inode_truncate_pages fs/btrfs/inode.c:5356 [inline]
 btrfs_evict_inode+0x1bd/0x1360 fs/btrfs/inode.c:5489
 evict+0x2ed/0x760 fs/inode.c:559
 iput_final fs/inode.c:1555 [inline]
 iput+0x4f1/0x860 fs/inode.c:1581
 close_ctree+0x3a1/0x850 fs/btrfs/disk-io.c:4040
 generic_shutdown_super+0x144/0x370 fs/super.c:456
 kill_anon_super+0x36/0x60 fs/super.c:1032
 btrfs_kill_super+0x49/0x550 fs/btrfs/super.c:2221
 deactivate_locked_super+0x94/0x160 fs/super.c:329
 deactivate_super+0x174/0x1a0 fs/super.c:360
 cleanup_mnt+0x1a8/0x290 fs/namespace.c:1098
 task_work_run+0x148/0x1c0 kernel/task_work.c:113
 tracehook_notify_resume include/linux/tracehook.h:193 [inline]
 exit_to_usermode_loop+0x251/0x2a0 arch/x86/entry/common.c:167
 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline]
 syscall_return_slowpath arch/x86/entry/common.c:271 [inline]
 do_syscall_64+0x538/0x620 arch/x86/entry/common.c:296
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f3396cf7f57
Code: ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 0f 1f 44 00 00 31 f6 e9 09 00 00 00 66 0f 1f 84 00 00 00 00 00 b8 a6 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fff7e8fec08 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007f3396cf7f57
RDX: 00007fff7e8fecdc RSI: 000000000000000a RDI: 00007fff7e8fecd0
RBP: 00007fff7e8fecd0 R08: 00000000ffffffff R09: 00007fff7e8feaa0
R10: 00005555569f1903 R11: 0000000000000246 R12: 00007f3396d50105
R13: 00007fff7e8ffd90 R14: 00005555569f1810 R15: 00007fff7e8ffdd0
page:ffffea0000e9b840 count:0 mapcount:0 mapping:0000000000000000 index:0x1505
flags: 0xfff00000000008(uptodate)
BTRFS warning (device <unknown>): duplicate device /dev/loop4 devid 1 generation 7 scanned by syz-executor.4 (21390)
raw: 00fff00000000008 dead000000000100 dead000000000200 0000000000000000
BTRFS warning (device <unknown>): duplicate device /dev/loop4 devid 1 generation 7 scanned by systemd-udevd (1104)
raw: 0000000000001505 0000000000000000 00000000ffffffff 0000000000000000
BTRFS warning (device <unknown>): duplicate device /dev/loop5 devid 1 generation 7 scanned by syz-executor.5 (21398)
page dumped because: VM_BUG_ON_PAGE(page_ref_count(page) == 0)
BTRFS warning (device <unknown>): duplicate device /dev/loop5 devid 1 generation 7 scanned by systemd-udevd (1108)
------------[ cut here ]------------
kernel BUG at include/linux/mm.h:519!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 16364 Comm: syz-executor.1 Tainted: G    B             4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:put_page_testzero include/linux/mm.h:519 [inline]
RIP: 0010:release_pages+0xcd6/0x15a0 mm/swap.c:760
Code: 24 31 ed 4c 8b 28 e9 c4 fd ff ff 4d 8d 75 08 31 ed e9 79 f4 ff ff e8 d9 e9 e0 ff 48 c7 c6 40 86 71 88 4c 89 ef e8 8a 7b 08 00 <0f> 0b e8 c3 e9 e0 ff 4d 8d 6c 24 ff e9 89 f4 ff ff e8 b4 e9 e0 ff
RSP: 0018:ffff88805802f6e8 EFLAGS: 00010293
RAX: ffff8880535b85c0 RBX: 0000000000000001 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff81819ba6 RDI: ffffea0000e9b878
RBP: 0000000000000000 R08: 000000000000003e R09: 0000000000000000
R10: 0000000000000005 R11: ffffffff8c66505b R12: ffffea0000e9b874
R13: ffffea0000e9b840 R14: 0000000000000000 R15: dffffc0000000000
FS:  00005555569f0400(0000) GS:ffff8880ba100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f11f8b4f040 CR3: 00000000aae35000 CR4: 00000000003406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 __pagevec_release+0x7b/0x150 mm/swap.c:820
 pagevec_release include/linux/pagevec.h:86 [inline]
 truncate_inode_pages_range+0x8bb/0x1b00 mm/truncate.c:369
 evict_inode_truncate_pages fs/btrfs/inode.c:5356 [inline]
 btrfs_evict_inode+0x1bd/0x1360 fs/btrfs/inode.c:5489
 evict+0x2ed/0x760 fs/inode.c:559
 iput_final fs/inode.c:1555 [inline]
 iput+0x4f1/0x860 fs/inode.c:1581
 close_ctree+0x3a1/0x850 fs/btrfs/disk-io.c:4040
 generic_shutdown_super+0x144/0x370 fs/super.c:456
 kill_anon_super+0x36/0x60 fs/super.c:1032
 btrfs_kill_super+0x49/0x550 fs/btrfs/super.c:2221
 deactivate_locked_super+0x94/0x160 fs/super.c:329
 deactivate_super+0x174/0x1a0 fs/super.c:360
 cleanup_mnt+0x1a8/0x290 fs/namespace.c:1098
 task_work_run+0x148/0x1c0 kernel/task_work.c:113
 tracehook_notify_resume include/linux/tracehook.h:193 [inline]
 exit_to_usermode_loop+0x251/0x2a0 arch/x86/entry/common.c:167
 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline]
 syscall_return_slowpath arch/x86/entry/common.c:271 [inline]
 do_syscall_64+0x538/0x620 arch/x86/entry/common.c:296
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f3396cf7f57
Code: ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 0f 1f 44 00 00 31 f6 e9 09 00 00 00 66 0f 1f 84 00 00 00 00 00 b8 a6 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fff7e8fec08 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007f3396cf7f57
RDX: 00007fff7e8fecdc RSI: 000000000000000a RDI: 00007fff7e8fecd0
RBP: 00007fff7e8fecd0 R08: 00000000ffffffff R09: 00007fff7e8feaa0
R10: 00005555569f1903 R11: 0000000000000246 R12: 00007f3396d50105
R13: 00007fff7e8ffd90 R14: 00005555569f1810 R15: 00007fff7e8ffdd0
Modules linked in:
---[ end trace 4df9850b387d55ee ]---
RIP: 0010:put_page_testzero include/linux/mm.h:519 [inline]
RIP: 0010:release_pages+0xcd6/0x15a0 mm/swap.c:760
Code: 24 31 ed 4c 8b 28 e9 c4 fd ff ff 4d 8d 75 08 31 ed e9 79 f4 ff ff e8 d9 e9 e0 ff 48 c7 c6 40 86 71 88 4c 89 ef e8 8a 7b 08 00 <0f> 0b e8 c3 e9 e0 ff 4d 8d 6c 24 ff e9 89 f4 ff ff e8 b4 e9 e0 ff
RSP: 0018:ffff88805802f6e8 EFLAGS: 00010293
RAX: ffff8880535b85c0 RBX: 0000000000000001 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff81819ba6 RDI: ffffea0000e9b878
RBP: 0000000000000000 R08: 000000000000003e R09: 0000000000000000
BTRFS warning (device <unknown>): duplicate device /dev/loop4 devid 1 generation 7 scanned by syz-executor.4 (21418)
R10: 0000000000000005 R11: ffffffff8c66505b R12: ffffea0000e9b874
R13: ffffea0000e9b840 R14: 0000000000000000 R15: dffffc0000000000
FS:  00005555569f0400(0000) GS:ffff8880ba100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
BTRFS warning (device <unknown>): duplicate device /dev/loop4 devid 1 generation 7 scanned by systemd-udevd (1104)
CR2: 00007f291c18f000 CR3: 00000000aae35000 CR4: 00000000003406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/11/21 10:57 linux-4.19.y 3f8a27f9e27b 4eb20a4e .config console log report info ci2-linux-4-19 BUG: Bad page state
* Struck through repros no longer work on HEAD.