block nbd3: Device being setup by another task block nbd3: shutting down sockets INFO: task syz-executor.3:8446 blocked for more than 140 seconds. Not tainted 4.19.80 #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. syz-executor.3 D28040 8446 7492 0x00000004 Call Trace: context_switch kernel/sched/core.c:2826 [inline] __schedule+0x866/0x1dc0 kernel/sched/core.c:3515 schedule+0x92/0x1c0 kernel/sched/core.c:3559 schedule_timeout+0x8c8/0xfc0 kernel/time/timer.c:1782 do_wait_for_common kernel/sched/completion.c:83 [inline] __wait_for_common kernel/sched/completion.c:104 [inline] wait_for_common kernel/sched/completion.c:115 [inline] wait_for_completion+0x29c/0x440 kernel/sched/completion.c:136 flush_workqueue+0x40f/0x14b0 kernel/workqueue.c:2707 nbd_start_device_ioctl drivers/block/nbd.c:1223 [inline] __nbd_ioctl drivers/block/nbd.c:1294 [inline] nbd_ioctl+0xb52/0xcb0 drivers/block/nbd.c:1334 __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:0x459a59 Code: 70 c0 00 48 83 fb 10 7c 6e 49 c7 c4 00 00 00 00 48 89 f7 48 83 fb 20 0f 87 c8 00 00 00 48 8d 44 1e f0 eb 17 f3 0f 6f 0f 66 0f <74> c8 66 0f d7 d1 f3 0f b8 d2 49 01 d4 48 83 c7 10 48 39 c7 76 e4 RSP: 002b:00007fa5e1d04c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 0000000000459a59 RDX: 0000000000000000 RSI: 000000000000ab03 RDI: 0000000000000005 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007fa5e1d056d4 R13: 00000000004c3381 R14: 00000000004d70b8 R15: 00000000ffffffff Showing all locks held in the system: 1 lock held by khungtaskd/1036: #0: 00000000910a7ccb (rcu_read_lock){....}, at: debug_show_all_locks+0x5f/0x27e kernel/locking/lockdep.c:4438 2 locks held by kworker/u5:0/1167: #0: 00000000880a93b4 ((wq_completion)"knbd%d-recv"nbd->index){+.+.}, at: __write_once_size include/linux/compiler.h:220 [inline] #0: 00000000880a93b4 ((wq_completion)"knbd%d-recv"nbd->index){+.+.}, at: arch_atomic64_set arch/x86/include/asm/atomic64_64.h:34 [inline] #0: 00000000880a93b4 ((wq_completion)"knbd%d-recv"nbd->index){+.+.}, at: atomic64_set include/asm-generic/atomic-instrumented.h:40 [inline] #0: 00000000880a93b4 ((wq_completion)"knbd%d-recv"nbd->index){+.+.}, at: atomic_long_set include/asm-generic/atomic-long.h:59 [inline] #0: 00000000880a93b4 ((wq_completion)"knbd%d-recv"nbd->index){+.+.}, at: set_work_data kernel/workqueue.c:617 [inline] #0: 00000000880a93b4 ((wq_completion)"knbd%d-recv"nbd->index){+.+.}, at: set_work_pool_and_clear_pending kernel/workqueue.c:644 [inline] #0: 00000000880a93b4 ((wq_completion)"knbd%d-recv"nbd->index){+.+.}, at: process_one_work+0x87e/0x1750 kernel/workqueue.c:2124 #1: 000000007a12ee4f ((work_completion)(&args->work)){+.+.}, at: process_one_work+0x8b4/0x1750 kernel/workqueue.c:2128 3 locks held by rs:main Q:Reg/7316: 1 lock held by rsyslogd/7319: #0: 000000003d95974e (&f->f_pos_lock){+.+.}, at: __fdget_pos+0xee/0x110 fs/file.c:767 2 locks held by getty/7441: #0: 00000000aceeb1d3 (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:362 #1: 000000005b558abb (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x232/0x1b30 drivers/tty/n_tty.c:2154 2 locks held by getty/7442: #0: 00000000411aa595 (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:362 #1: 00000000763d23c8 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x232/0x1b30 drivers/tty/n_tty.c:2154 2 locks held by getty/7443: #0: 00000000525eb980 (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:362 #1: 000000008e79334f (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x232/0x1b30 drivers/tty/n_tty.c:2154 2 locks held by getty/7444: #0: 00000000bc731719 (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:362 #1: 00000000a44cb2d6 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x232/0x1b30 drivers/tty/n_tty.c:2154 2 locks held by getty/7445: #0: 0000000023bf3a82 (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:362 #1: 000000006c259fc0 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x232/0x1b30 drivers/tty/n_tty.c:2154 2 locks held by getty/7446: #0: 00000000b001529c (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:362 #1: 0000000084a6e422 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x232/0x1b30 drivers/tty/n_tty.c:2154 2 locks held by getty/7447: #0: 0000000082c2c23e (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:362 #1: 000000001089cbc5 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x232/0x1b30 drivers/tty/n_tty.c:2154 ============================================= NMI backtrace for cpu 0 CPU: 0 PID: 1036 Comm: khungtaskd Not tainted 4.19.80 #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+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: 7316 Comm: rs:main Q:Reg Not tainted 4.19.80 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:bio_free+0xeb/0x150 block/bio.c:267 Code: 00 e8 29 eb ff ff 48 8d 7b 08 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 0f b6 04 02 84 c0 74 04 3c 03 7e 45 8b 43 08 <48> 8d 73 10 4c 89 e7 48 29 c7 e8 86 20 79 fe e8 b1 3b 5e fe 48 83 RSP: 0018:ffff888094defa40 EFLAGS: 00000246 RAX: 0000000000000000 RBX: ffffffff8a460d80 RCX: ffffffff830c769f RDX: 1ffffffff148c1b1 RSI: ffffffff830c770f RDI: ffffffff8a460d88 RBP: ffff888094defa58 R08: ffff88809fb1c640 R09: ffff88809fb1cf08 R10: 0000000000000000 R11: 0000000000000000 R12: ffff88808f85bb80 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 FS: 00007f0be8e7e700(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000c42f3f5b00 CR3: 000000009126d000 CR4: 00000000001406e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: bio_put+0xe7/0x110 block/bio.c:561 blkdev_issue_flush+0x269/0x300 block/blk-flush.c:573 ext4_sync_file+0xb90/0x1450 fs/ext4/fsync.c:157 vfs_fsync_range+0x141/0x230 fs/sync.c:197 generic_write_sync include/linux/fs.h:2746 [inline] ext4_file_write_iter+0x7a0/0x1060 fs/ext4/file.c:281 call_write_iter include/linux/fs.h:1820 [inline] new_sync_write fs/read_write.c:474 [inline] __vfs_write+0x587/0x810 fs/read_write.c:487 vfs_write+0x20c/0x560 fs/read_write.c:549 ksys_write+0x14f/0x2d0 fs/read_write.c:599 __do_sys_write fs/read_write.c:611 [inline] __se_sys_write fs/read_write.c:608 [inline] __x64_sys_write+0x73/0xb0 fs/read_write.c:608 do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f0bea8dc19d Code: d1 20 00 00 75 10 b8 01 00 00 00 0f 05 48 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 be fa ff ff 48 89 04 24 b8 01 00 00 00 0f 05 <48> 8b 3c 24 48 89 c2 e8 07 fb ff ff 48 89 d0 48 83 c4 08 48 3d 01 RSP: 002b:00007f0be8e7cf90 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000000400 RCX: 00007f0bea8dc19d RDX: 0000000000000400 RSI: 00000000006a0ce0 RDI: 0000000000000006 RBP: 00000000006a0ce0 R08: 00000000006bc4e0 R09: 00007f0bea25adc0 R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000000 R13: 00007f0be8e7d410 R14: 00000000006bc4e0 R15: 00000000006a0ae0