syzbot


WARNING in close_fs_devices (3)

Status: fixed on 2021/11/10 00:50
Subsystems: btrfs
[Documentation on labels]
Reported-by: syzbot+a70e2ad0879f160b9217@syzkaller.appspotmail.com
Fix commit: b2a616676839 btrfs: fix rw device counting in __btrfs_free_extra_devids
First crash: 1417d, last: 1168d
Cause bisection: introduced by (bisect log) :
commit 4d004099a668c41522242aa146a38cc4eb59cb1e
Author: Peter Zijlstra <peterz@infradead.org>
Date: Fri Oct 2 09:04:21 2020 +0000

  lockdep: Fix lockdep recursion

Crash: BUG: using __this_cpu_read() in preemptible code in trace_hardirqs_on (log)
Repro: C syz .config
  
Discussions (7)
Title Replies (including bot) Last reply
[PATCH v2] btrfs: fix rw device counting in __btrfs_free_extra_devids 14 (14) 2021/08/20 17:53
[PATCH 4.19 00/30] 4.19.201-rc1 review 36 (36) 2021/08/05 01:08
[PATCH 5.10 00/67] 5.10.56-rc1 review 83 (83) 2021/08/04 06:35
[PATCH 5.13 000/104] 5.13.8-rc1 review 109 (109) 2021/08/03 19:37
[PATCH 5.4 00/40] 5.4.138-rc1 review 44 (44) 2021/08/03 19:16
[PATCH] btrfs: fix rw device counting in __btrfs_free_extra_devids 10 (10) 2021/07/26 23:07
WARNING in close_fs_devices (3) 0 (3) 2020/11/29 16:52
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream WARNING in close_fs_devices btrfs C 137 2277d 2320d 8/28 fixed on 2018/08/28 17:48
linux-4.19 WARNING in close_fs_devices C done 105 1168d 1486d 1/1 fixed on 2021/08/30 09:32
upstream WARNING in close_fs_devices (2) btrfs C 23 1423d 1484d 15/28 fixed on 2020/11/20 14:54
Last patch testing requests (1)
Created Duration User Patch Repo Result
2021/07/15 08:10 20m desmondcheongzx@gmail.com patch upstream OK

Sample crash report:
------------[ cut here ]------------
WARNING: CPU: 1 PID: 9355 at fs/btrfs/volumes.c:1168 close_fs_devices+0x763/0x880 fs/btrfs/volumes.c:1168
Modules linked in:
CPU: 0 PID: 9355 Comm: syz-executor552 Not tainted 5.13.0-rc1-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:close_fs_devices+0x763/0x880 fs/btrfs/volumes.c:1168
Code: c4 38 5b 41 5c 41 5d 41 5e 41 5f 5d c3 e8 85 0d 19 fe 0f 0b e9 29 f9 ff ff e8 79 0d 19 fe 0f 0b e9 3c ff ff ff e8 6d 0d 19 fe <0f> 0b e9 69 ff ff ff 48 c7 c1 14 45 38 8e 80 e1 07 80 c1 03 38 c1
RSP: 0018:ffffc9000333f2f0 EFLAGS: 00010293
RAX: ffffffff8365f5c3 RBX: 0000000000000001 RCX: ffff888029afd4c0
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000
RBP: ffff88802846f508 R08: ffffffff8365f525 R09: ffffed100337d128
R10: ffffed100337d128 R11: 0000000000000000 R12: dffffc0000000000
R13: ffff888019be8868 R14: 1ffff1100337d10d R15: 1ffff1100337d10a
FS:  00007f6f53828700(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000000047c410 CR3: 00000000302a6000 CR4: 00000000001506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 btrfs_close_devices+0xc9/0x450 fs/btrfs/volumes.c:1180
 open_ctree+0x8e1/0x3968 fs/btrfs/disk-io.c:3693
 btrfs_fill_super fs/btrfs/super.c:1382 [inline]
 btrfs_mount_root+0xac5/0xc60 fs/btrfs/super.c:1749
 legacy_get_tree+0xea/0x180 fs/fs_context.c:592
 vfs_get_tree+0x86/0x270 fs/super.c:1498
 fc_mount fs/namespace.c:993 [inline]
 vfs_kern_mount+0xc9/0x160 fs/namespace.c:1023
 btrfs_mount+0x3d3/0xb50 fs/btrfs/super.c:1809
 legacy_get_tree+0xea/0x180 fs/fs_context.c:592
 vfs_get_tree+0x86/0x270 fs/super.c:1498
 do_new_mount fs/namespace.c:2905 [inline]
 path_mount+0x196f/0x2be0 fs/namespace.c:3235
 do_mount fs/namespace.c:3248 [inline]
 __do_sys_mount fs/namespace.c:3456 [inline]
 __se_sys_mount+0x2f9/0x3b0 fs/namespace.c:3433
 do_syscall_64+0x3f/0xb0 arch/x86/entry/common.c:47
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x44c08a
Code: 48 c7 c2 b8 ff ff ff f7 d8 64 89 02 b8 ff ff ff ff eb d2 e8 a8 00 00 00 0f 1f 84 00 00 00 00 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f6f53828128 EFLAGS: 00000286 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007f6f538281c0 RCX: 000000000044c08a
RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007f6f53828180
RBP: 0000000000000003 R08: 00007f6f538281c0 R09: 0000000020000000
R10: 0000000000000000 R11: 0000000000000286 R12: 0000000000000004
R13: 0000000020000218 R14: 0000000020000100 R15: 00007f6f53828180

Crashes (98):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/05/14 20:17 upstream 315d99318179 8bdd5343 .config console log report syz C ci-upstream-kasan-gce-smack-root WARNING in close_fs_devices
2021/05/14 17:36 upstream 315d99318179 8bdd5343 .config console log report syz C ci-upstream-kasan-gce-root WARNING in close_fs_devices
2021/06/07 08:45 linux-next a1f92694393a 500c2339 .config console log report syz C ci-upstream-linux-next-kasan-gce-root WARNING in close_fs_devices
2020/11/29 13:58 linux-next 6174f05255e6 a0092f9d .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2021/07/30 22:04 upstream 764a5bc89b12 6c236867 .config console log report info ci-upstream-kasan-gce-root WARNING in close_fs_devices
2021/07/30 09:10 upstream 7e96bf476270 c585c7b0 .config console log report info ci-upstream-kasan-gce-selinux-root WARNING in close_fs_devices
2021/07/29 07:31 upstream 4010a528219e 9a4781d4 .config console log report info ci-upstream-kasan-gce-smack-root WARNING in close_fs_devices
2021/07/28 18:22 upstream 7d549995d4e0 17d6ab15 .config console log report info ci-upstream-kasan-gce-root WARNING in close_fs_devices
2021/07/26 05:03 upstream d8079fac1681 4d1b57d4 .config console log report info ci-upstream-kasan-gce-root WARNING in close_fs_devices
2021/07/26 01:51 upstream d8079fac1681 4d1b57d4 .config console log report info ci-upstream-kasan-gce-smack-root WARNING in close_fs_devices
2021/07/25 20:13 upstream 6498f6151825 4d1b57d4 .config console log report info ci-upstream-kasan-gce-selinux-root WARNING in close_fs_devices
2021/07/24 18:21 upstream f0fddcec6b62 4d1b57d4 .config console log report info ci-upstream-kasan-gce-smack-root WARNING in close_fs_devices
2021/07/24 05:23 upstream 8baef6386baa bc5f1d88 .config console log report info ci-upstream-kasan-gce-selinux-root WARNING in close_fs_devices
2021/07/21 00:39 upstream 8cae8cd89f05 1b201b48 .config console log report info ci-upstream-kasan-gce-root WARNING in close_fs_devices
2021/07/18 23:00 upstream 1d67c8d993ba f115ae98 .config console log report info ci-upstream-kasan-gce-smack-root WARNING in close_fs_devices
2021/07/17 22:51 upstream d980cc0620ae f115ae98 .config console log report info ci-upstream-kasan-gce-smack-root WARNING in close_fs_devices
2021/07/16 06:23 upstream dd9c7df94c1b f115ae98 .config console log report info ci-upstream-kasan-gce-smack-root WARNING in close_fs_devices
2021/07/15 20:48 upstream 8096acd7442e b9a2f64e .config console log report info ci-upstream-kasan-gce-root WARNING in close_fs_devices
2021/07/15 01:33 upstream 8096acd7442e 94e0b707 .config console log report info ci-upstream-kasan-gce-smack-root WARNING in close_fs_devices
2021/07/13 14:27 upstream 7fef2edf7cc7 f415556d .config console log report info ci-upstream-kasan-gce-root WARNING in close_fs_devices
2021/07/12 16:00 upstream e73f0f0ee754 a4869c92 .config console log report info ci-upstream-kasan-gce-selinux-root WARNING in close_fs_devices
2021/07/07 22:13 upstream 3dbdb38e2869 4846d5c1 .config console log report info ci-upstream-kasan-gce-smack-root WARNING in close_fs_devices
2021/07/07 19:04 upstream 3dbdb38e2869 4846d5c1 .config console log report info ci-upstream-kasan-gce-root WARNING in close_fs_devices
2021/07/07 05:54 upstream 3dbdb38e2869 cca78469 .config console log report info ci-upstream-kasan-gce-smack-root WARNING in close_fs_devices
2021/07/06 14:00 upstream 3dbdb38e2869 6c4484eb .config console log report info ci-upstream-kasan-gce-selinux-root WARNING in close_fs_devices
2021/07/06 03:26 upstream 3dbdb38e2869 55aa55c2 .config console log report info ci-upstream-kasan-gce-smack-root WARNING in close_fs_devices
2021/07/04 20:00 upstream 3dbdb38e2869 55aa55c2 .config console log report info ci-upstream-kasan-gce-root WARNING in close_fs_devices
2021/07/01 15:36 upstream dbe69e433722 658ebc66 .config console log report info ci-upstream-kasan-gce-root WARNING in close_fs_devices
2021/06/28 22:54 upstream 62fb9874f5da 9d2ab5df .config console log report info ci-upstream-kasan-gce-root WARNING in close_fs_devices
2021/06/28 11:32 upstream b4b27b9eed8e 9d2ab5df .config console log report info ci-upstream-kasan-gce-smack-root WARNING in close_fs_devices
2021/06/15 08:12 upstream 009c9aa5be65 1ba81399 .config console log report info ci-upstream-kasan-gce-root WARNING in close_fs_devices
2021/06/15 07:07 upstream 009c9aa5be65 1ba81399 .config console log report info ci-upstream-kasan-gce-smack-root WARNING in close_fs_devices
2021/06/07 22:50 upstream 614124bea77e e59537be .config console log report info ci-upstream-kasan-gce-root WARNING in close_fs_devices
2021/06/06 01:22 upstream e5220dd16778 500c2339 .config console log report info ci-upstream-kasan-gce-root WARNING in close_fs_devices
2021/05/29 07:04 upstream 5ff2756afde0 858ea628 .config console log report info ci-upstream-kasan-gce-smack-root WARNING in close_fs_devices
2021/05/29 05:56 upstream 5ff2756afde0 858ea628 .config console log report info ci-upstream-kasan-gce-smack-root WARNING in close_fs_devices
2021/05/28 01:38 upstream d7c5303fbc8a 858ea628 .config console log report info ci-upstream-kasan-gce-smack-root WARNING in close_fs_devices
2021/05/26 05:56 upstream a050a6d2b7e8 93d3a9f6 .config console log report info ci-upstream-kasan-gce-root WARNING in close_fs_devices
2021/05/24 02:39 upstream 6ebb6814a1ef 3c7fef33 .config console log report info ci-upstream-kasan-gce-root WARNING in close_fs_devices
2021/05/19 16:50 upstream 8ac91e6c6033 a343ba6b .config console log report info ci-upstream-kasan-gce-root WARNING in close_fs_devices
2021/05/13 07:16 upstream dbb5afad100a ed7d41c5 .config console log report info ci-upstream-kasan-gce-selinux-root WARNING in close_fs_devices
2021/05/01 23:14 upstream d2b6f8a17919 77e2b668 .config console log report info ci-upstream-kasan-gce-smack-root WARNING in close_fs_devices
2021/04/30 04:51 upstream d2b6f8a17919 77e2b668 .config console log report info ci-upstream-kasan-gce-root WARNING in close_fs_devices
2021/04/23 19:29 upstream 18a3c5f7abfd 17f0b706 .config console log report info ci-upstream-kasan-gce-selinux-root WARNING in close_fs_devices
2021/04/23 04:31 upstream 90c911ad7445 590921a5 .config console log report info ci-upstream-kasan-gce-root WARNING in close_fs_devices
2021/04/22 07:09 upstream 16fc44d6387e 2bc8999a .config console log report info ci-upstream-kasan-gce-smack-root WARNING in close_fs_devices
2021/04/22 00:54 upstream 16fc44d6387e 2bc8999a .config console log report info ci-upstream-kasan-gce-selinux-root WARNING in close_fs_devices
2021/04/17 23:58 upstream 194cf4825638 7e2b734b .config console log report info ci-upstream-kasan-gce-root WARNING in close_fs_devices
2021/04/15 05:18 upstream 7f75285ca572 fcdb12ba .config console log report info ci-upstream-kasan-gce-root WARNING in close_fs_devices
2021/02/02 00:34 upstream 88bb507a74ea e6b95f32 .config console log report info ci-qemu-upstream-386 WARNING in close_fs_devices
2021/07/10 10:09 linux-next 92510a7fd93c 8f5a7b8c .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING in close_fs_devices
2021/07/07 03:55 linux-next d72e63193059 cca78469 .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING in close_fs_devices
2021/07/05 01:44 linux-next a1f92694393a 55aa55c2 .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING in close_fs_devices
2021/06/13 09:35 linux-next a1f92694393a 1ba81399 .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING in close_fs_devices
2021/05/31 18:11 linux-next a1f92694393a 032639db .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING in close_fs_devices
2021/05/14 15:18 linux-next cd557f1c605f 8bdd5343 .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING in close_fs_devices
2021/01/04 15:54 upstream e71ba9452f0b 79264ae3 .config console log report info ci-upstream-kasan-gce-root
2020/11/24 20:06 upstream d5beb3140f91 e34b696c .config console log report info ci-upstream-kasan-gce-smack-root
* Struck through repros no longer work on HEAD.