syzbot


WARNING in blkdev_get_by_dev

Status: fixed on 2023/09/28 17:51
Subsystems: block
[Documentation on labels]
Reported-by: syzbot+00cd27751f78817f167b@syzkaller.appspotmail.com
Fix commit: 985958b8584c block: fix wrong mode for blkdev_get_by_dev() from disk_scan_partitions()
First crash: 346d, last: 338d
Cause bisection: introduced by (bisect log) :
commit 2736e8eeb0ccdc71d1f4256c9c9a28f58cc43307
Author: Christoph Hellwig <hch@lst.de>
Date: Thu Jun 8 11:02:43 2023 +0000

  block: use the holder as indication for exclusive opens

Crash: WARNING in blkdev_get_by_dev (log)
Repro: C syz .config
  
Discussions (3)
Title Replies (including bot) Last reply
[PATCH -next v2] block: fix wrong mode for blkdev_get_by_dev() from disk_scan_partitions() 2 (2) 2023/06/20 09:54
[PATCH -next] block: fix wrong mode for blkdev_get_by_dev() from disk_scan_partitions() 1 (1) 2023/06/17 10:38
[syzbot] [block?] WARNING in blkdev_get_by_dev 0 (1) 2023/06/17 08:05

Sample crash report:
------------[ cut here ]------------
WARNING: CPU: 1 PID: 5024 at block/bdev.c:794 blkdev_get_by_dev.part.0+0x8ea/0xb50 block/bdev.c:794
Modules linked in:
CPU: 1 PID: 5024 Comm: syz-executor231 Not tainted 6.4.0-rc6-next-20230613-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/25/2023
RIP: 0010:blkdev_get_by_dev.part.0+0x8ea/0xb50 block/bdev.c:794
Code: 44 24 08 e8 c8 94 7c fd 48 85 ed 4c 63 6c 24 08 0f 85 5f fe ff ff e9 ca fe ff ff e8 40 62 e3 fd e9 fe f8 ff ff e8 86 23 90 fd <0f> 0b 49 c7 c5 fb ff ff ff e9 c2 fe ff ff e8 73 23 90 fd 48 8b 44
RSP: 0018:ffffc90003a0fc98 EFLAGS: 00010293
RAX: 0000000000000000 RBX: ffff88801e5f2e00 RCX: 0000000000000000
RDX: ffff88807e089dc0 RSI: ffffffff83f4524a RDI: 0000000000000005
RBP: 0000000000000000 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000000000004 R11: 0000000000000001 R12: ffff88801fc56000
R13: 0000000000000005 R14: 0000000000000000 R15: 0000000000000004
FS:  0000555556bcf300(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000005fdeb8 CR3: 000000007ceb9000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 blkdev_get_by_dev+0x79/0x80 block/bdev.c:845
 disk_scan_partitions+0x1e2/0x300 block/genhd.c:368
 blkdev_common_ioctl+0x5b8/0x1a40 block/ioctl.c:531
 blkdev_ioctl+0x24f/0x760 block/ioctl.c:600
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:870 [inline]
 __se_sys_ioctl fs/ioctl.c:856 [inline]
 __x64_sys_ioctl+0x19d/0x210 fs/ioctl.c:856
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f9e3c0e35c9
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:00007ffc336b7018 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f9e3c0e35c9
RDX: 0000000000000000 RSI: 000000000000125f RDI: 0000000000000003
RBP: 00007f9e3c0a30d0 R08: 0000000000000000 R09: 0000000000000000
R10: 000000000000ffff R11: 0000000000000246 R12: 00007f9e3c0a3160
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
 </TASK>

Crashes (45):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/06/14 01:51 linux-next 1f6ce8392d6f d2ee9228 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in blkdev_get_by_dev
2023/06/21 20:42 linux-next 15e71592dbae 09ffe269 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in blkdev_get_by_dev
2023/06/21 11:53 linux-next 15e71592dbae 09ffe269 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in blkdev_get_by_dev
2023/06/21 05:01 linux-next f7efed9f38f8 09ffe269 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in blkdev_get_by_dev
2023/06/21 03:15 linux-next f7efed9f38f8 09ffe269 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in blkdev_get_by_dev
2023/06/21 01:22 linux-next f7efed9f38f8 09ffe269 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in blkdev_get_by_dev
2023/06/20 21:51 linux-next f7efed9f38f8 09ffe269 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in blkdev_get_by_dev
2023/06/20 15:28 linux-next f7efed9f38f8 09ffe269 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in blkdev_get_by_dev
2023/06/20 04:14 linux-next f7efed9f38f8 d521bc56 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in blkdev_get_by_dev
2023/06/20 04:14 linux-next f7efed9f38f8 d521bc56 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in blkdev_get_by_dev
2023/06/19 23:54 linux-next f7efed9f38f8 d521bc56 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in blkdev_get_by_dev
2023/06/19 21:20 linux-next f7efed9f38f8 d521bc56 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in blkdev_get_by_dev
2023/06/19 09:59 linux-next f7efed9f38f8 f3921d4d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in blkdev_get_by_dev
2023/06/19 09:16 linux-next f7efed9f38f8 f3921d4d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in blkdev_get_by_dev
2023/06/19 02:44 linux-next f7efed9f38f8 f3921d4d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in blkdev_get_by_dev
2023/06/19 02:41 linux-next f7efed9f38f8 f3921d4d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in blkdev_get_by_dev
2023/06/19 02:41 linux-next f7efed9f38f8 f3921d4d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in blkdev_get_by_dev
2023/06/19 02:39 linux-next f7efed9f38f8 f3921d4d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in blkdev_get_by_dev
2023/06/19 02:00 linux-next f7efed9f38f8 f3921d4d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in blkdev_get_by_dev
2023/06/19 01:24 linux-next f7efed9f38f8 f3921d4d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in blkdev_get_by_dev
2023/06/18 23:15 linux-next f7efed9f38f8 f3921d4d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in blkdev_get_by_dev
2023/06/18 19:01 linux-next f7efed9f38f8 f3921d4d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in blkdev_get_by_dev
2023/06/18 15:19 linux-next f7efed9f38f8 f3921d4d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in blkdev_get_by_dev
2023/06/18 12:50 linux-next f7efed9f38f8 f3921d4d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in blkdev_get_by_dev
2023/06/18 04:12 linux-next f7efed9f38f8 f3921d4d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in blkdev_get_by_dev
2023/06/18 02:41 linux-next f7efed9f38f8 f3921d4d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in blkdev_get_by_dev
2023/06/17 21:52 linux-next f7efed9f38f8 f3921d4d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in blkdev_get_by_dev
2023/06/17 08:19 linux-next f7efed9f38f8 f3921d4d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in blkdev_get_by_dev
2023/06/17 07:50 linux-next f7efed9f38f8 f3921d4d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in blkdev_get_by_dev
2023/06/16 15:49 linux-next f7efed9f38f8 f3921d4d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in blkdev_get_by_dev
2023/06/16 14:18 linux-next f7efed9f38f8 f3921d4d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in blkdev_get_by_dev
2023/06/16 01:31 linux-next 925294c9aa18 757d26ed .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in blkdev_get_by_dev
2023/06/15 21:46 linux-next 925294c9aa18 757d26ed .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in blkdev_get_by_dev
2023/06/15 21:46 linux-next 925294c9aa18 757d26ed .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in blkdev_get_by_dev
2023/06/15 21:17 linux-next 925294c9aa18 757d26ed .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in blkdev_get_by_dev
2023/06/15 20:33 linux-next 925294c9aa18 757d26ed .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in blkdev_get_by_dev
2023/06/15 12:16 linux-next 925294c9aa18 76decb82 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in blkdev_get_by_dev
2023/06/14 18:59 linux-next b16049b21162 d2ee9228 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in blkdev_get_by_dev
2023/06/14 16:12 linux-next b16049b21162 d2ee9228 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in blkdev_get_by_dev
2023/06/14 15:53 linux-next b16049b21162 d2ee9228 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in blkdev_get_by_dev
2023/06/14 02:35 linux-next 1f6ce8392d6f d2ee9228 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in blkdev_get_by_dev
2023/06/13 21:55 linux-next 1f6ce8392d6f d2ee9228 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in blkdev_get_by_dev
2023/06/13 16:00 linux-next 1f6ce8392d6f 749afb64 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in blkdev_get_by_dev
2023/06/13 07:58 linux-next 1f6ce8392d6f 749afb64 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in blkdev_get_by_dev
* Struck through repros no longer work on HEAD.