INFO: task hung in __blkdev_get

12 views
Skip to first unread message

syzbot

unread,
Aug 12, 2019, 8:10:12 PM8/12/19
to syzkaller...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: 893af1c7 Linux 4.19.66
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=15b5b8a6600000
kernel config: https://syzkaller.appspot.com/x/.config?x=d5fac5a8617b8643
dashboard link: https://syzkaller.appspot.com/bug?extid=daad98bf0e9fc3cdbb5c
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=11064fc2600000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=15e1b7c2600000

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+daad98...@syzkaller.appspotmail.com

print_req_error: I/O error, dev loop3, sector 64
isofs_fill_super: bread failed, dev=loop3, iso_blknum=16, block=32
isofs_fill_super: bread failed, dev=loop3, iso_blknum=16, block=32
INFO: task syz-executor112:8024 blocked for more than 140 seconds.
Not tainted 4.19.66 #40
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor112 D28216 8024 7812 0x00000004
Call Trace:
context_switch kernel/sched/core.c:2826 [inline]
__schedule+0x866/0x1dc0 kernel/sched/core.c:3474
schedule+0x92/0x1c0 kernel/sched/core.c:3518
schedule_preempt_disabled+0x13/0x20 kernel/sched/core.c:3576
__mutex_lock_common kernel/locking/mutex.c:1002 [inline]
__mutex_lock+0x726/0x1300 kernel/locking/mutex.c:1072
mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:1087
__blkdev_get+0x19b/0x1660 fs/block_dev.c:1471
blkdev_get+0x484/0x990 fs/block_dev.c:1625
blkdev_get_by_path+0xaf/0x130 fs/block_dev.c:1703
mount_bdev+0x5d/0x3c0 fs/super.c:1116
isofs_mount+0x35/0x40 fs/isofs/inode.c:1570
mount_fs+0xa8/0x31f fs/super.c:1261
vfs_kern_mount.part.0+0x6f/0x410 fs/namespace.c:961
vfs_kern_mount fs/namespace.c:951 [inline]
do_new_mount fs/namespace.c:2469 [inline]
do_mount+0x53e/0x2bc0 fs/namespace.c:2799
ksys_mount+0xdb/0x150 fs/namespace.c:3015
__do_sys_mount fs/namespace.c:3029 [inline]
__se_sys_mount fs/namespace.c:3026 [inline]
__x64_sys_mount+0xbe/0x150 fs/namespace.c:3026
do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x441a19
Code: 73 75 70 70 6f 72 74 65 64 20 69 6e 20 63 6f 6d 70 61 74 69 62 69 6c
69 74 79 20 6d 6f 64 65 73 20 30 20 74 6f 20 32 20 2d 20 <69> 67 6e 6f 72
65 64 0a 00 00 00 00 00 00 00 57 41 52 4e 49 4e 47
RSP: 002b:00007ffca4599708 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000441a19
RDX: 00000000200000c0 RSI: 0000000020000180 RDI: 0000000020001e00
RBP: 000000000009dbed R08: 0000000000000000 R09: 00000000004027c0
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000402730
R13: 00000000004027c0 R14: 0000000000000000 R15: 0000000000000000
INFO: task syz-executor112:8025 blocked for more than 140 seconds.
Not tainted 4.19.66 #40
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor112 D28152 8025 7811 0x00000004
Call Trace:
context_switch kernel/sched/core.c:2826 [inline]
__schedule+0x866/0x1dc0 kernel/sched/core.c:3474
schedule+0x92/0x1c0 kernel/sched/core.c:3518
__rwsem_down_read_failed_common kernel/locking/rwsem-xadd.c:292 [inline]
rwsem_down_read_failed+0x21b/0x3c0 kernel/locking/rwsem-xadd.c:309
call_rwsem_down_read_failed+0x18/0x30 arch/x86/lib/rwsem.S:94
__down_read arch/x86/include/asm/rwsem.h:83 [inline]
down_read+0x49/0xb0 kernel/locking/rwsem.c:26
__get_super.part.0+0x203/0x2e0 fs/super.c:698
__get_super include/linux/spinlock.h:329 [inline]
get_super+0x2e/0x50 fs/super.c:727
fsync_bdev+0x19/0xd0 fs/block_dev.c:483
invalidate_partition+0x36/0x60 block/genhd.c:1580
drop_partitions block/partition-generic.c:454 [inline]
rescan_partitions+0xef/0xa20 block/partition-generic.c:527
__blkdev_reread_part+0x1a2/0x230 block/ioctl.c:173
blkdev_reread_part+0x27/0x40 block/ioctl.c:193
loop_reread_partitions+0x1c/0x40 drivers/block/loop.c:634
loop_set_status+0xe54/0x1370 drivers/block/loop.c:1297
loop_set_status64+0xc2/0x120 drivers/block/loop.c:1417
lo_ioctl+0x432/0x20e0 drivers/block/loop.c:1560
__blkdev_driver_ioctl block/ioctl.c:303 [inline]
blkdev_ioctl+0xc38/0x1ab6 block/ioctl.c:601
block_ioctl+0xee/0x130 fs/block_dev.c:1891
vfs_ioctl fs/ioctl.c:46 [inline]
file_ioctl fs/ioctl.c:501 [inline]
do_vfs_ioctl+0xd5f/0x1380 fs/ioctl.c:688
ksys_ioctl+0xab/0xd0 fs/ioctl.c:705
__do_sys_ioctl fs/ioctl.c:712 [inline]
__se_sys_ioctl fs/ioctl.c:710 [inline]
__x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:710
do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x441927
Code: 65 61 64 6d 69 6e 69 6d 75 6d 6d 65 73 73 61 67 65 73 00 61 63 74 69
6f 6e 65 78 65 63 6f 6e 6c 79 77 68 65 6e 70 72 65 76 69 <6f> 75 73 69 73
73 75 73 70 65 6e 64 65 64 00 00 00 64 65 62 75 67
RSP: 002b:00007ffca45994c8 EFLAGS: 00000202 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000441927
RDX: 00007ffca4599560 RSI: 0000000000004c04 RDI: 0000000000000004
RBP: 0000000000000003 R08: 0000000000000000 R09: 000000000000000a
R10: 0000000000000075 R11: 0000000000000202 R12: 0000000000402730
R13: 0000000000000004 R14: 0000000000000000 R15: 0000000000000000
INFO: task syz-executor112:8030 blocked for more than 140 seconds.
Not tainted 4.19.66 #40
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor112 D28120 8030 7813 0x00000004
Call Trace:
context_switch kernel/sched/core.c:2826 [inline]
__schedule+0x866/0x1dc0 kernel/sched/core.c:3474
schedule+0x92/0x1c0 kernel/sched/core.c:3518
bd_prepare_to_claim fs/block_dev.c:1068 [inline]
bd_start_claiming fs/block_dev.c:1159 [inline]
blkdev_get+0x414/0x990 fs/block_dev.c:1618
blkdev_get_by_path+0xaf/0x130 fs/block_dev.c:1703
mount_bdev+0x5d/0x3c0 fs/super.c:1116
isofs_mount+0x35/0x40 fs/isofs/inode.c:1570
mount_fs+0xa8/0x31f fs/super.c:1261
vfs_kern_mount.part.0+0x6f/0x410 fs/namespace.c:961
vfs_kern_mount fs/namespace.c:951 [inline]
do_new_mount fs/namespace.c:2469 [inline]
do_mount+0x53e/0x2bc0 fs/namespace.c:2799
ksys_mount+0xdb/0x150 fs/namespace.c:3015
__do_sys_mount fs/namespace.c:3029 [inline]
__se_sys_mount fs/namespace.c:3026 [inline]
__x64_sys_mount+0xbe/0x150 fs/namespace.c:3026
do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x441a19
Code: 73 75 70 70 6f 72 74 65 64 20 69 6e 20 63 6f 6d 70 61 74 69 62 69 6c
69 74 79 20 6d 6f 64 65 73 20 30 20 74 6f 20 32 20 2d 20 <69> 67 6e 6f 72
65 64 0a 00 00 00 00 00 00 00 57 41 52 4e 49 4e 47
RSP: 002b:00007ffca4599708 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000441a19
RDX: 00000000200000c0 RSI: 0000000020000180 RDI: 0000000020001e00
RBP: 000000000009dbef R08: 0000000000000000 R09: 00000000004027c0
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000402730
R13: 00000000004027c0 R14: 0000000000000000 R15: 0000000000000000
INFO: task syz-executor112:8035 blocked for more than 140 seconds.
Not tainted 4.19.66 #40
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor112 D28216 8035 7810 0x00000004
Call Trace:
context_switch kernel/sched/core.c:2826 [inline]
__schedule+0x866/0x1dc0 kernel/sched/core.c:3474
schedule+0x92/0x1c0 kernel/sched/core.c:3518
bd_prepare_to_claim fs/block_dev.c:1068 [inline]
bd_start_claiming fs/block_dev.c:1159 [inline]
blkdev_get+0x414/0x990 fs/block_dev.c:1618
blkdev_get_by_path+0xaf/0x130 fs/block_dev.c:1703
mount_bdev+0x5d/0x3c0 fs/super.c:1116
isofs_mount+0x35/0x40 fs/isofs/inode.c:1570
mount_fs+0xa8/0x31f fs/super.c:1261
vfs_kern_mount.part.0+0x6f/0x410 fs/namespace.c:961
vfs_kern_mount fs/namespace.c:951 [inline]
do_new_mount fs/namespace.c:2469 [inline]
do_mount+0x53e/0x2bc0 fs/namespace.c:2799
ksys_mount+0xdb/0x150 fs/namespace.c:3015
__do_sys_mount fs/namespace.c:3029 [inline]
__se_sys_mount fs/namespace.c:3026 [inline]
__x64_sys_mount+0xbe/0x150 fs/namespace.c:3026
do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x441a19
Code: 73 75 70 70 6f 72 74 65 64 20 69 6e 20 63 6f 6d 70 61 74 69 62 69 6c
69 74 79 20 6d 6f 64 65 73 20 30 20 74 6f 20 32 20 2d 20 <69> 67 6e 6f 72
65 64 0a 00 00 00 00 00 00 00 57 41 52 4e 49 4e 47
RSP: 002b:00007ffca4599708 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000441a19
RDX: 00000000200000c0 RSI: 0000000020000180 RDI: 0000000020001e00
RBP: 000000000009dc37 R08: 0000000000000000 R09: 00000000004027c0
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000402730
R13: 00000000004027c0 R14: 0000000000000000 R15: 0000000000000000
INFO: task syz-executor112:8038 blocked for more than 140 seconds.
Not tainted 4.19.66 #40
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor112 D28216 8038 7808 0x00000004
Call Trace:
context_switch kernel/sched/core.c:2826 [inline]
__schedule+0x866/0x1dc0 kernel/sched/core.c:3474
schedule+0x92/0x1c0 kernel/sched/core.c:3518
bd_prepare_to_claim fs/block_dev.c:1068 [inline]
bd_start_claiming fs/block_dev.c:1159 [inline]
blkdev_get+0x414/0x990 fs/block_dev.c:1618
blkdev_get_by_path+0xaf/0x130 fs/block_dev.c:1703
mount_bdev+0x5d/0x3c0 fs/super.c:1116
isofs_mount+0x35/0x40 fs/isofs/inode.c:1570
mount_fs+0xa8/0x31f fs/super.c:1261
vfs_kern_mount.part.0+0x6f/0x410 fs/namespace.c:961
vfs_kern_mount fs/namespace.c:951 [inline]
do_new_mount fs/namespace.c:2469 [inline]
do_mount+0x53e/0x2bc0 fs/namespace.c:2799
ksys_mount+0xdb/0x150 fs/namespace.c:3015
__do_sys_mount fs/namespace.c:3029 [inline]
__se_sys_mount fs/namespace.c:3026 [inline]
__x64_sys_mount+0xbe/0x150 fs/namespace.c:3026
do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x441a19
Code: 73 75 70 70 6f 72 74 65 64 20 69 6e 20 63 6f 6d 70 61 74 69 62 69 6c
69 74 79 20 6d 6f 64 65 73 20 30 20 74 6f 20 32 20 2d 20 <69> 67 6e 6f 72
65 64 0a 00 00 00 00 00 00 00 57 41 52 4e 49 4e 47
RSP: 002b:00007ffca4599708 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000441a19
RDX: 00000000200000c0 RSI: 0000000020000180 RDI: 0000000020001e00
RBP: 000000000009dcd0 R08: 0000000000000000 R09: 00000000004027c0
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000402730
R13: 00000000004027c0 R14: 0000000000000000 R15: 0000000000000000

Showing all locks held in the system:
1 lock held by khungtaskd/1042:
#0: 0000000001be9a56 (rcu_read_lock){....}, at:
debug_show_all_locks+0x5f/0x27e kernel/locking/lockdep.c:4435
1 lock held by rsyslogd/7658:
#0: 00000000d342bd00 (&f->f_pos_lock){+.+.}, at: __fdget_pos+0xee/0x110
fs/file.c:767
2 locks held by getty/7780:
#0: 0000000076ec786f (&tty->ldisc_sem){++++}, at:
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:363
#1: 0000000010fd9cce (&ldata->atomic_read_lock){+.+.}, at:
n_tty_read+0x232/0x1b30 drivers/tty/n_tty.c:2154
2 locks held by getty/7781:
#0: 00000000358c9821 (&tty->ldisc_sem){++++}, at:
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:363
#1: 0000000016dd99b7 (&ldata->atomic_read_lock){+.+.}, at:
n_tty_read+0x232/0x1b30 drivers/tty/n_tty.c:2154
2 locks held by getty/7782:
#0: 000000008452a2bd (&tty->ldisc_sem){++++}, at:
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:363
#1: 0000000052ebfbd0 (&ldata->atomic_read_lock){+.+.}, at:
n_tty_read+0x232/0x1b30 drivers/tty/n_tty.c:2154
2 locks held by getty/7783:
#0: 00000000d3361dd8 (&tty->ldisc_sem){++++}, at:
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:363
#1: 000000000c7295e0 (&ldata->atomic_read_lock){+.+.}, at:
n_tty_read+0x232/0x1b30 drivers/tty/n_tty.c:2154
2 locks held by getty/7784:
#0: 00000000a0e0a95f (&tty->ldisc_sem){++++}, at:
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:363
#1: 0000000029e7dc30 (&ldata->atomic_read_lock){+.+.}, at:
n_tty_read+0x232/0x1b30 drivers/tty/n_tty.c:2154
2 locks held by getty/7785:
#0: 00000000e539d663 (&tty->ldisc_sem){++++}, at:
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:363
#1: 00000000ade1580e (&ldata->atomic_read_lock){+.+.}, at:
n_tty_read+0x232/0x1b30 drivers/tty/n_tty.c:2154
2 locks held by getty/7786:
#0: 000000005052c9b1 (&tty->ldisc_sem){++++}, at:
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:363
#1: 000000005cff0744 (&ldata->atomic_read_lock){+.+.}, at:
n_tty_read+0x232/0x1b30 drivers/tty/n_tty.c:2154
1 lock held by syz-executor112/8011:
1 lock held by syz-executor112/8024:
#0: 000000005eb98044 (&bdev->bd_mutex){+.+.}, at:
__blkdev_get+0x19b/0x1660 fs/block_dev.c:1471
2 locks held by syz-executor112/8025:
#0: 000000005eb98044 (&bdev->bd_mutex){+.+.}, at:
blkdev_reread_part+0x1f/0x40 block/ioctl.c:192
#1: 00000000cfd29f02 (&type->s_umount_key#52){++++}, at:
__get_super.part.0+0x203/0x2e0 fs/super.c:698

=============================================

NMI backtrace for cpu 0
CPU: 0 PID: 1042 Comm: khungtaskd Not tainted 4.19.66 #40
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+0x172/0x1f0 lib/dump_stack.c:113
nmi_cpu_backtrace.cold+0x63/0xa4 lib/nmi_backtrace.c:101
nmi_trigger_cpumask_backtrace+0x1b0/0x1f8 lib/nmi_backtrace.c:62
arch_trigger_cpumask_backtrace+0x14/0x20 arch/x86/kernel/apic/hw_nmi.c:38
trigger_all_cpu_backtrace include/linux/nmi.h:146 [inline]
check_hung_uninterruptible_tasks kernel/hung_task.c:203 [inline]
watchdog+0x9df/0xee0 kernel/hung_task.c:287
kthread+0x354/0x420 kernel/kthread.c:246
ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 8011 Comm: syz-executor112 Not tainted 4.19.66 #40
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
RIP: 0010:compound_head include/linux/page-flags.h:144 [inline]
RIP: 0010:trylock_page include/linux/pagemap.h:472 [inline]
RIP: 0010:lock_page include/linux/pagemap.h:482 [inline]
RIP: 0010:pagecache_get_page+0x5c0/0xa40 mm/filemap.c:1576
Code: f8 48 c1 e8 03 42 80 3c 30 00 0f 85 32 04 00 00 49 8b 44 24 08 31 ff
48 89 c6 48 89 45 b0 83 e6 01 48 89 75 c0 e8 c0 f9 e5 ff <48> 8b 75 c0 4c
89 e0 48 85 f6 0f 85 ef 02 00 00 48 89 45 c0 e8 07
RSP: 0018:ffff88809bed7920 EFLAGS: 00000293
RAX: 0000000000000000 RBX: 0000000000000007 RCX: ffffffff81856710
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000007
RBP: ffff88809bed7970 R08: ffff8880982505c0 R09: 0000000000000001
R10: ffffed1015d24732 R11: ffff8880ae923993 R12: ffffea00021d0400
R13: 0000000000620848 R14: dffffc0000000000 R15: ffffea00021d0408
FS: 000000000129a940(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffff600400 CR3: 000000009f758000 CR4: 00000000001406e0
Call Trace:
find_or_create_page include/linux/pagemap.h:322 [inline]
grow_dev_page fs/buffer.c:948 [inline]
grow_buffers fs/buffer.c:1017 [inline]
__getblk_slow fs/buffer.c:1044 [inline]
__getblk_gfp+0x284/0x970 fs/buffer.c:1321
__bread_gfp+0x2f/0x300 fs/buffer.c:1355
sb_bread include/linux/buffer_head.h:307 [inline]
isofs_fill_super+0xb3b/0x29fc fs/isofs/inode.c:678
mount_bdev+0x304/0x3c0 fs/super.c:1158
isofs_mount+0x35/0x40 fs/isofs/inode.c:1570
mount_fs+0xa8/0x31f fs/super.c:1261
vfs_kern_mount.part.0+0x6f/0x410 fs/namespace.c:961
vfs_kern_mount fs/namespace.c:951 [inline]
do_new_mount fs/namespace.c:2469 [inline]
do_mount+0x53e/0x2bc0 fs/namespace.c:2799
ksys_mount+0xdb/0x150 fs/namespace.c:3015
__do_sys_mount fs/namespace.c:3029 [inline]
__se_sys_mount fs/namespace.c:3026 [inline]
__x64_sys_mount+0xbe/0x150 fs/namespace.c:3026
do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x441a19
Code: bd 08 fc ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 0f 83 8b 08 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007ffca4599708 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000441a19
RDX: 00000000200000c0 RSI: 0000000020000180 RDI: 0000000020001e00
RBP: 000000000009db46 R08: 0000000000000000 R09: 00000000004027c0
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000402730
R13: 00000000004027c0 R14: 0000000000000000 R15: 0000000000000000


---
This bug is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this bug report. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
syzbot can test patches for this bug, for details see:
https://goo.gl/tpsmEJ#testing-patches
Reply all
Reply to author
Forward
0 new messages