Please do not flush events_freezable_power_ WQ.
======================================================
WARNING: possible circular locking dependency detected
5.17.0-rc5-next-20220222 #1 Not tainted
------------------------------------------------------
syz-executor.1/41941 is trying to acquire lock:
ffffffff851162a0 (console_owner){-.-.}-{0:0}, at: console_unlock+0x34e/0xd40 kernel/printk/printk.c:2771
but task is already holding lock:
ffff88806ce37418 (&pool->lock){-.-.}-{2:2}, at: start_flush_work kernel/workqueue.c:3036 [inline]
ffff88806ce37418 (&pool->lock){-.-.}-{2:2}, at: __flush_work+0x17f/0xae0 kernel/workqueue.c:3091
which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:
-> #3 (&pool->lock){-.-.}-{2:2}:
__raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline]
_raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:154
__queue_work+0x39f/0x10a0 kernel/workqueue.c:1474
queue_work_on+0xae/0xc0 kernel/workqueue.c:1545
queue_work include/linux/workqueue.h:514 [inline]
schedule_work include/linux/workqueue.h:575 [inline]
p9_pollwake+0xb9/0x170 net/9p/trans_fd.c:534
__wake_up_common+0x14c/0x4c0 kernel/sched/wait.c:108
__wake_up_common_lock+0xd0/0x130 kernel/sched/wait.c:138
tty_write_unlock drivers/tty/tty_io.c:945 [inline]
do_tty_write drivers/tty/tty_io.c:1049 [inline]
file_tty_write.constprop.0+0x62f/0x910 drivers/tty/tty_io.c:1095
__kernel_write+0x59e/0xb40 fs/read_write.c:536
kernel_write fs/read_write.c:565 [inline]
kernel_write+0xe2/0x550 fs/read_write.c:555
p9_fd_write net/9p/trans_fd.c:428 [inline]
p9_write_work+0x25a/0xc30 net/9p/trans_fd.c:479
process_one_work+0xa1c/0x16a0 kernel/workqueue.c:2289
worker_thread+0x637/0x1250 kernel/workqueue.c:2436
kthread+0x2f0/0x3a0 kernel/kthread.c:376
ret_from_fork+0x22/0x30 arch/x86/entry/entry_64.S:295
-> #2 (&tty->write_wait){-.-.}-{2:2}:
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0x39/0x50 kernel/locking/spinlock.c:162
__wake_up_common_lock+0xb4/0x130 kernel/sched/wait.c:137
tty_port_default_wakeup+0x26/0x40 drivers/tty/tty_port.c:51
serial8250_tx_chars+0x50b/0xb00 drivers/tty/serial/8250/8250_port.c:1853
serial8250_handle_irq.part.0+0x3f1/0x4c0 drivers/tty/serial/8250/8250_port.c:1940
serial8250_handle_irq drivers/tty/serial/8250/8250_port.c:1913 [inline]
serial8250_default_handle_irq+0xb8/0x230 drivers/tty/serial/8250/8250_port.c:1957
serial8250_interrupt+0xf4/0x1a0 drivers/tty/serial/8250/8250_core.c:126
__handle_irq_event_percpu+0x20f/0x820 kernel/irq/handle.c:158
handle_irq_event_percpu kernel/irq/handle.c:193 [inline]
handle_irq_event+0xa7/0x1e0 kernel/irq/handle.c:210
handle_edge_irq+0x262/0xd10 kernel/irq/chip.c:817
generic_handle_irq_desc include/linux/irqdesc.h:158 [inline]
handle_irq arch/x86/kernel/irq.c:231 [inline]
__common_interrupt+0x92/0x1d0 arch/x86/kernel/irq.c:250
common_interrupt+0x9f/0xc0 arch/x86/kernel/irq.c:240
asm_common_interrupt+0x1e/0x40 arch/x86/include/asm/idtentry.h:629
native_safe_halt arch/x86/include/asm/irqflags.h:51 [inline]
arch_safe_halt arch/x86/include/asm/irqflags.h:89 [inline]
default_idle+0xb/0x10 arch/x86/kernel/process.c:733
default_idle_call+0x87/0xd0 kernel/sched/idle.c:112
cpuidle_idle_call kernel/sched/idle.c:194 [inline]
do_idle+0x3b9/0x530 kernel/sched/idle.c:306
cpu_startup_entry+0x14/0x20 kernel/sched/idle.c:403
secondary_startup_64_no_verify+0xd5/0xdb
-> #1 (&port_lock_key){-.-.}-{2:2}:
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0x39/0x50 kernel/locking/spinlock.c:162
serial8250_console_write+0x90e/0xb20 drivers/tty/serial/8250/8250_port.c:3359
call_console_drivers kernel/printk/printk.c:1953 [inline]
console_unlock+0x8c7/0xd40 kernel/printk/printk.c:2775
register_console kernel/printk/printk.c:3122 [inline]
register_console+0x378/0x7d0 kernel/printk/printk.c:3013
univ8250_console_init+0x3a/0x46 drivers/tty/serial/8250/8250_core.c:679
console_init+0x3c1/0x58d kernel/printk/printk.c:3232
start_kernel+0x301/0x4aa init/main.c:1068
secondary_startup_64_no_verify+0xd5/0xdb
-> #0 (console_owner){-.-.}-{0:0}:
check_prev_add kernel/locking/lockdep.c:3096 [inline]
check_prevs_add kernel/locking/lockdep.c:3219 [inline]
validate_chain kernel/locking/lockdep.c:3834 [inline]
__lock_acquire+0x2c2f/0x6120 kernel/locking/lockdep.c:5060
lock_acquire kernel/locking/lockdep.c:5672 [inline]
lock_acquire+0x1a2/0x4d0 kernel/locking/lockdep.c:5637
console_lock_spinning_enable kernel/printk/printk.c:1795 [inline]
console_unlock+0x3a1/0xd40 kernel/printk/printk.c:2772
vprintk_emit+0x1b4/0x550 kernel/printk/printk.c:2273
vprintk+0x80/0x90 kernel/printk/printk_safe.c:50
_printk+0xba/0xed kernel/printk/printk.c:2294
warn_flush_attempt kernel/workqueue.c:2613 [inline]
check_flush_dependency.cold+0x18/0x4e kernel/workqueue.c:2635
start_flush_work kernel/workqueue.c:3049 [inline]
__flush_work+0x246/0xae0 kernel/workqueue.c:3091
__cancel_work_timer+0x398/0x4d0 kernel/workqueue.c:3179
disk_block_events+0x102/0x130 block/disk-events.c:93
blkdev_get_by_dev+0xe4/0xcb0 block/bdev.c:805
blkdev_open+0x154/0x2e0 block/fops.c:498
do_dentry_open+0x4b7/0x1110 fs/open.c:957
do_open fs/namei.c:3476 [inline]
path_openat+0x1a3e/0x28a0 fs/namei.c:3609
do_filp_open+0x1aa/0x400 fs/namei.c:3636
do_sys_openat2+0x16d/0x4d0 fs/open.c:1347
do_sys_open fs/open.c:1363 [inline]
__do_sys_openat fs/open.c:1379 [inline]
__se_sys_openat fs/open.c:1374 [inline]
__x64_sys_openat+0x13f/0x1f0 fs/open.c:1374
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3b/0x90 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x44/0xae
other info that might help us debug this:
Chain exists of:
console_owner --> &tty->write_wait --> &pool->lock
Possible unsafe locking scenario:
CPU0 CPU1
---- ----
lock(&pool->lock);
lock(&tty->write_wait);
lock(&pool->lock);
lock(console_owner);
*** DEADLOCK ***
4 locks held by syz-executor.1/41941:
#0: ffff88800ef1a0c0 (&ev->block_mutex){+.+.}-{3:3}, at: disk_block_events+0x5b/0x130 block/disk-events.c:86
#1: ffffffff85202f00 (rcu_read_lock){....}-{1:2}, at: __flush_work+0xf9/0xae0 kernel/workqueue.c:3086
#2: ffff88806ce37418 (&pool->lock){-.-.}-{2:2}, at: start_flush_work kernel/workqueue.c:3036 [inline]
#2: ffff88806ce37418 (&pool->lock){-.-.}-{2:2}, at: __flush_work+0x17f/0xae0 kernel/workqueue.c:3091
#3: ffffffff851f66e0 (console_lock){+.+.}-{0:0}, at: vprintk+0x80/0x90 kernel/printk/printk_safe.c:50
stack backtrace:
CPU: 1 PID: 41941 Comm: syz-executor.1 Not tainted 5.17.0-rc5-next-20220222 #1
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x8b/0xb3 lib/dump_stack.c:106
check_noncircular+0x25f/0x2e0 kernel/locking/lockdep.c:2176
check_prev_add kernel/locking/lockdep.c:3096 [inline]
check_prevs_add kernel/locking/lockdep.c:3219 [inline]
validate_chain kernel/locking/lockdep.c:3834 [inline]
__lock_acquire+0x2c2f/0x6120 kernel/locking/lockdep.c:5060
lock_acquire kernel/locking/lockdep.c:5672 [inline]
lock_acquire+0x1a2/0x4d0 kernel/locking/lockdep.c:5637
console_lock_spinning_enable kernel/printk/printk.c:1795 [inline]
console_unlock+0x3a1/0xd40 kernel/printk/printk.c:2772
vprintk_emit+0x1b4/0x550 kernel/printk/printk.c:2273
vprintk+0x80/0x90 kernel/printk/printk_safe.c:50
_printk+0xba/0xed kernel/printk/printk.c:2294
warn_flush_attempt kernel/workqueue.c:2613 [inline]
check_flush_dependency.cold+0x18/0x4e kernel/workqueue.c:2635
start_flush_work kernel/workqueue.c:3049 [inline]
__flush_work+0x246/0xae0 kernel/workqueue.c:3091
__cancel_work_timer+0x398/0x4d0 kernel/workqueue.c:3179
disk_block_events+0x102/0x130 block/disk-events.c:93
blkdev_get_by_dev+0xe4/0xcb0 block/bdev.c:805
blkdev_open+0x154/0x2e0 block/fops.c:498
do_dentry_open+0x4b7/0x1110 fs/open.c:957
do_open fs/namei.c:3476 [inline]
path_openat+0x1a3e/0x28a0 fs/namei.c:3609
do_filp_open+0x1aa/0x400 fs/namei.c:3636
do_sys_openat2+0x16d/0x4d0 fs/open.c:1347
do_sys_open fs/open.c:1363 [inline]
__do_sys_openat fs/open.c:1379 [inline]
__se_sys_openat fs/open.c:1374 [inline]
__x64_sys_openat+0x13f/0x1f0 fs/open.c:1374
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3b/0x90 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7f0806605b19
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f0803b7b188 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007f0806718f60 RCX: 00007f0806605b19
RDX: 0000000000040b01 RSI: 0000000020000000 RDI: ffffffffffffff9c
RBP: 00007f080665ff6d R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffd5105202f R14: 00007f0803b7b300 R15: 0000000000022000
CPU: 1 PID: 41941 Comm: syz-executor.1 Not tainted 5.17.0-rc5-next-20220222 #1
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x8b/0xb3 lib/dump_stack.c:106
warn_flush_attempt kernel/workqueue.c:2614 [inline]
check_flush_dependency.cold+0x1d/0x4e kernel/workqueue.c:2635
start_flush_work kernel/workqueue.c:3049 [inline]
__flush_work+0x246/0xae0 kernel/workqueue.c:3091
__cancel_work_timer+0x398/0x4d0 kernel/workqueue.c:3179
disk_block_events+0x102/0x130 block/disk-events.c:93
blkdev_get_by_dev+0xe4/0xcb0 block/bdev.c:805
blkdev_open+0x154/0x2e0 block/fops.c:498
do_dentry_open+0x4b7/0x1110 fs/open.c:957
do_open fs/namei.c:3476 [inline]
path_openat+0x1a3e/0x28a0 fs/namei.c:3609
do_filp_open+0x1aa/0x400 fs/namei.c:3636
do_sys_openat2+0x16d/0x4d0 fs/open.c:1347
do_sys_open fs/open.c:1363 [inline]
__do_sys_openat fs/open.c:1379 [inline]
__se_sys_openat fs/open.c:1374 [inline]
__x64_sys_openat+0x13f/0x1f0 fs/open.c:1374
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3b/0x90 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7f0806605b19
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f0803b7b188 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007f0806718f60 RCX: 00007f0806605b19
RDX: 0000000000040b01 RSI: 0000000020000000 RDI: ffffffffffffff9c
RBP: 00007f080665ff6d R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffd5105202f R14: 00007f0803b7b300 R15: 0000000000022000
netlink: 4 bytes leftover after parsing attributes in process `syz-executor.4'.
netlink: 4 bytes leftover after parsing attributes in process `syz-executor.4'.
netlink: 4 bytes leftover after parsing attributes in process `syz-executor.4'.
netlink: 4 bytes leftover after parsing attributes in process `syz-executor.4'.
syz-executor.4: vmalloc error: size 593494016, page order 9, failed to allocate pages, mode:0xdc0(GFP_KERNEL|__GFP_ZERO), nodemask=(null),cpuset=syz4,mems_allowed=0
CPU: 1 PID: 43464 Comm: syz-executor.4 Not tainted 5.17.0-rc5-next-20220222 #1
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x8b/0xb3 lib/dump_stack.c:106
warn_alloc.cold+0x95/0x18a mm/page_alloc.c:4237
__vmalloc_area_node mm/vmalloc.c:2979 [inline]
__vmalloc_node_range+0xfcb/0x1360 mm/vmalloc.c:3107
__vmalloc_node+0xb5/0x100 mm/vmalloc.c:3157
alloc_one_pg_vec_page net/packet/af_packet.c:4297 [inline]
alloc_pg_vec net/packet/af_packet.c:4322 [inline]
packet_set_ring+0xb60/0x1b20 net/packet/af_packet.c:4407
packet_setsockopt+0x1b56/0x3cc0 net/packet/af_packet.c:3783
__sys_setsockopt+0x180/0x2a0 net/socket.c:2180
__do_sys_setsockopt net/socket.c:2191 [inline]
__se_sys_setsockopt net/socket.c:2188 [inline]
__x64_sys_setsockopt+0xba/0x150 net/socket.c:2188
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3b/0x90 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7fa228245b19
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fa2257bb188 EFLAGS: 00000246 ORIG_RAX: 0000000000000036
RAX: ffffffffffffffda RBX: 00007fa228358f60 RCX: 00007fa228245b19
RDX: 000000000000000d RSI: 0000000000000107 RDI: 0000000000000003
RBP: 00007fa22829ff6d R08: 0000000000000010 R09: 0000000000000000
R10: 0000000020000100 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fff02154bcf R14: 00007fa2257bb300 R15: 0000000000022000
Mem-Info:
active_anon:59 inactive_anon:33932 isolated_anon:0
active_file:19858 inactive_file:24535 isolated_file:0
unevictable:0 dirty:42 writeback:0
slab_reclaimable:10684 slab_unreclaimable:66597
mapped:81190 shmem:172 pagetables:7329 bounce:0
kernel_misc_reclaimable:0
free:29729 free_pcp:264 free_cma:0
Node 0 active_anon:236kB inactive_anon:135728kB active_file:79432kB inactive_file:98140kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:324760kB dirty:168kB writeback:0kB shmem:688kB writeback_tmp:0kB kernel_stack:10912kB pagetables:29316kB all_unreclaimable? no
Node 0 DMA free:7168kB boost:0kB min:44kB low:56kB high:68kB reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:15992kB managed:15360kB mlocked:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB
lowmem_reserve[]: 0 1617 1617 1617
Node 0 DMA32 free:111748kB boost:0kB min:5120kB low:6776kB high:8432kB reserved_highatomic:0KB active_anon:236kB inactive_anon:135728kB active_file:79348kB inactive_file:98140kB unevictable:0kB writepending:0kB present:2080640kB managed:1660824kB mlocked:0kB bounce:0kB free_pcp:940kB local_pcp:656kB free_cma:0kB
lowmem_reserve[]: 0 0 0 0
Node 0 DMA: 0*4kB 0*8kB 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 1*1024kB (U) 1*2048kB (M) 1*4096kB (M) = 7168kB
Node 0 DMA32: 1418*4kB (UME) 842*8kB (UME) 612*16kB (UME) 463*32kB (UME) 326*64kB (UME) 141*128kB (UME) 60*256kB (UME) 19*512kB (UM) 10*1024kB (UM) 0*2048kB 0*4096kB = 111256kB
Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB
35444 total pagecache pages
0 pages in swap cache
Swap cache stats: add 0, delete 0, find 0/0
Free swap = 0kB
Total swap = 0kB
524158 pages RAM
0 pages HighMem/MovableOnly
105112 pages reserved