SELinux: security_context_str_to_sid (user_u) failed with errno=-22
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.0/6455 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:
ffff88806cf37418 (&pool->lock){-.-.}-{2:2}, at: start_flush_work kernel/workqueue.c:3036 [inline]
ffff88806cf37418 (&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
__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline]
_raw_spin_unlock_irqrestore+0x2e/0x50 kernel/locking/spinlock.c:194
spin_unlock_irqrestore include/linux/spinlock.h:409 [inline]
uart_write+0x304/0x580 drivers/tty/serial/serial_core.c:587
do_output_char+0x5e4/0x860 drivers/tty/n_tty.c:435
process_output drivers/tty/n_tty.c:501 [inline]
n_tty_write+0x4c9/0xfe0 drivers/tty/n_tty.c:2260
do_tty_write drivers/tty/tty_io.c:1024 [inline]
file_tty_write.constprop.0+0x529/0x910 drivers/tty/tty_io.c:1095
redirected_tty_write+0xa1/0xc0 drivers/tty/tty_io.c:1116
call_write_iter include/linux/fs.h:2095 [inline]
do_iter_readv_writev+0x481/0x760 fs/read_write.c:726
do_iter_write+0x18d/0x700 fs/read_write.c:852
vfs_writev+0x1aa/0x630 fs/read_write.c:925
do_writev+0x139/0x300 fs/read_write.c:968
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
-> #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+0x478/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.0/6455:
#0: ffff88800ef65cc0 (&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: ffff88806cf37418 (&pool->lock){-.-.}-{2:2}, at: start_flush_work kernel/workqueue.c:3036 [inline]
#2: ffff88806cf37418 (&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: 0 PID: 6455 Comm: syz-executor.0 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+0x478/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:0x7feab413eb19
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:00007feab16b4188 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007feab4251f60 RCX: 00007feab413eb19
RDX: 00000000009efc82 RSI: 0000000020000380 RDI: ffffffffffffff9c
RBP: 00007feab4198f6d R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fff12dd1b6f R14: 00007feab16b4300 R15: 0000000000022000
CPU: 0 PID: 6455 Comm: syz-executor.0 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+0x478/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:0x7feab413eb19
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:00007feab16b4188 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007feab4251f60 RCX: 00007feab413eb19
RDX: 00000000009efc82 RSI: 0000000020000380 RDI: ffffffffffffff9c
RBP: 00007feab4198f6d R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fff12dd1b6f R14: 00007feab16b4300 R15: 0000000000022000
9pnet_fd: p9_fd_create_tcp (6463): problem connecting socket to 127.0.0.1
loop7: detected capacity change from 0 to 264192
FAT-fs (loop7): Unrecognized mount option "ÿÿÿÿÿÿÿÿ" or missing value
loop7: detected capacity change from 0 to 264192
FAT-fs (loop7): Unrecognized mount option "ÿÿÿÿÿÿÿÿ" or missing value
9pnet_fd: p9_fd_create_tcp (6471): problem connecting socket to 127.0.0.1
loop7: detected capacity change from 0 to 210340
SELinux: security_context_str_to_sid (sysadm_u) failed with errno=-22
loop7: detected capacity change from 0 to 264192
FAT-fs (loop7): Unrecognized mount option "ÿÿÿÿÿÿÿÿ" or missing value