vhci_hcd: connection closed vhci_hcd: stop threads vhci_hcd: release socket vhci_hcd: disconnect device ====================================================== WARNING: possible circular locking dependency detected 4.19.195-syzkaller #0 Not tainted ------------------------------------------------------ kworker/1:2/4681 is trying to acquire lock: 00000000b69ceae4 (&sb->s_type->i_mutex_key#13){+.+.}, at: inode_lock include/linux/fs.h:748 [inline] 00000000b69ceae4 (&sb->s_type->i_mutex_key#13){+.+.}, at: __sock_release+0x86/0x2a0 net/socket.c:578 but task is already holding lock: 00000000e11a56cf ((delayed_fput_work).work){+.+.}, at: process_one_work+0x79c/0x1570 kernel/workqueue.c:2128 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #3 ((delayed_fput_work).work){+.+.}: worker_thread+0x64c/0x1130 kernel/workqueue.c:2296 kthread+0x33f/0x460 kernel/kthread.c:259 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 -> #2 ((wq_completion)"events"){+.+.}: flush_scheduled_work include/linux/workqueue.h:599 [inline] tipc_exit_net+0x38/0x60 net/tipc/core.c:100 ops_exit_list+0xa5/0x150 net/core/net_namespace.c:153 cleanup_net+0x3b4/0x8b0 net/core/net_namespace.c:553 process_one_work+0x864/0x1570 kernel/workqueue.c:2153 worker_thread+0x64c/0x1130 kernel/workqueue.c:2296 kthread+0x33f/0x460 kernel/kthread.c:259 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 -> #1 (pernet_ops_rwsem){++++}: unregister_netdevice_notifier+0x7b/0x330 net/core/dev.c:1708 bcm_release+0x94/0x700 net/can/bcm.c:1525 __sock_release+0xcd/0x2a0 net/socket.c:579 sock_close+0x15/0x20 net/socket.c:1140 __fput+0x2ce/0x890 fs/file_table.c:278 task_work_run+0x148/0x1c0 kernel/task_work.c:113 exit_task_work include/linux/task_work.h:22 [inline] do_exit+0xbf3/0x2be0 kernel/exit.c:870 do_group_exit+0x125/0x310 kernel/exit.c:967 get_signal+0x3f2/0x1f70 kernel/signal.c:2589 do_signal+0x8f/0x1670 arch/x86/kernel/signal.c:799 exit_to_usermode_loop+0x204/0x2a0 arch/x86/entry/common.c:163 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline] syscall_return_slowpath arch/x86/entry/common.c:271 [inline] do_syscall_64+0x538/0x620 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe -> #0 (&sb->s_type->i_mutex_key#13){+.+.}: down_write+0x34/0x90 kernel/locking/rwsem.c:70 inode_lock include/linux/fs.h:748 [inline] __sock_release+0x86/0x2a0 net/socket.c:578 sock_close+0x15/0x20 net/socket.c:1140 __fput+0x2ce/0x890 fs/file_table.c:278 delayed_fput+0x56/0x70 fs/file_table.c:304 process_one_work+0x864/0x1570 kernel/workqueue.c:2153 worker_thread+0x64c/0x1130 kernel/workqueue.c:2296 kthread+0x33f/0x460 kernel/kthread.c:259 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 other info that might help us debug this: Chain exists of: &sb->s_type->i_mutex_key#13 --> (wq_completion)"events" --> (delayed_fput_work).work Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock((delayed_fput_work).work); lock((wq_completion)"events"); lock((delayed_fput_work).work); lock(&sb->s_type->i_mutex_key#13); *** DEADLOCK *** 2 locks held by kworker/1:2/4681: #0: 000000005f832411 ((wq_completion)"events"){+.+.}, at: process_one_work+0x767/0x1570 kernel/workqueue.c:2124 #1: 00000000e11a56cf ((delayed_fput_work).work){+.+.}, at: process_one_work+0x79c/0x1570 kernel/workqueue.c:2128 stack backtrace: CPU: 1 PID: 4681 Comm: kworker/1:2 Not tainted 4.19.195-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: events delayed_fput Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2ef lib/dump_stack.c:118 print_circular_bug.constprop.0.cold+0x2d7/0x41e kernel/locking/lockdep.c:1222 check_prev_add kernel/locking/lockdep.c:1866 [inline] check_prevs_add kernel/locking/lockdep.c:1979 [inline] validate_chain kernel/locking/lockdep.c:2420 [inline] __lock_acquire+0x30c9/0x3ff0 kernel/locking/lockdep.c:3416 lock_acquire+0x170/0x3c0 kernel/locking/lockdep.c:3908 down_write+0x34/0x90 kernel/locking/rwsem.c:70 inode_lock include/linux/fs.h:748 [inline] __sock_release+0x86/0x2a0 net/socket.c:578 sock_close+0x15/0x20 net/socket.c:1140 __fput+0x2ce/0x890 fs/file_table.c:278 delayed_fput+0x56/0x70 fs/file_table.c:304 process_one_work+0x864/0x1570 kernel/workqueue.c:2153 worker_thread+0x64c/0x1130 kernel/workqueue.c:2296 kthread+0x33f/0x460 kernel/kthread.c:259 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 kauditd_printk_skb: 7 callbacks suppressed audit: type=1804 audit(1624977227.272:247): pid=17670 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.1" name="/root/syzkaller-testdir335838408/syzkaller.5V7P0U/43/bus" dev="sda1" ino=14145 res=1 vhci_hcd vhci_hcd.0: pdev(4) rhport(1) sockfd(6) vhci_hcd vhci_hcd.0: devid(0) speed(5) speed_str(super-speed) netlink: 8 bytes leftover after parsing attributes in process `syz-executor.5'. netlink: 8 bytes leftover after parsing attributes in process `syz-executor.5'. vhci_hcd: connection closed vhci_hcd vhci_hcd.0: Device attached vhci_hcd: stop threads vhci_hcd: release socket vhci_hcd: disconnect device netlink: 8 bytes leftover after parsing attributes in process `syz-executor.5'. audit: type=1804 audit(1624977227.632:248): pid=17704 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.1" name="/root/syzkaller-testdir335838408/syzkaller.5V7P0U/44/bus" dev="sda1" ino=14659 res=1 UDF-fs: bad mount option "undel" or missing value netlink: 8 bytes leftover after parsing attributes in process `syz-executor.5'. FAT-fs (loop2): Unrecognized mount option "uid=UG e?9 ;MY8FqvUǎtQГku\މjБ$ nUzFE$b9;`t1=!v!"%fNWb`g]䜴I *;.6ZOMn+(>(O 0x000000000000ee01" or missing value netlink: 8 bytes leftover after parsing attributes in process `syz-executor.5'. netlink: 8 bytes leftover after parsing attributes in process `syz-executor.5'. netlink: 24 bytes leftover after parsing attributes in process `syz-executor.1'. netlink: 8 bytes leftover after parsing attributes in process `syz-executor.5'. IPVS: ftp: loaded support on port[0] = 21 IPVS: ftp: loaded support on port[0] = 21 nla_parse: 5 callbacks suppressed netlink: 8 bytes leftover after parsing attributes in process `syz-executor.5'. audit: type=1804 audit(1624977230.342:249): pid=17998 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.4" name="/root/syzkaller-testdir073299917/syzkaller.SCOQsZ/62/bus" dev="sda1" ino=14685 res=1 VFS: unable to find oldfs superblock on device loop0 net_ratelimit: 11 callbacks suppressed TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending cookies. Check SNMP counters. IPVS: ftp: loaded support on port[0] = 21 netlink: 8 bytes leftover after parsing attributes in process `syz-executor.5'. audit: type=1804 audit(1624977230.692:250): pid=18016 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=ToMToU comm="syz-executor.4" name="/root/syzkaller-testdir073299917/syzkaller.SCOQsZ/62/bus" dev="sda1" ino=14685 res=1 VFS: unable to find oldfs superblock on device loop0 netlink: 8 bytes leftover after parsing attributes in process `syz-executor.5'. audit: type=1804 audit(1624977231.252:251): pid=17990 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=ToMToU comm="syz-executor.4" name="/root/syzkaller-testdir073299917/syzkaller.SCOQsZ/62/bus" dev="sda1" ino=14685 res=1 audit: type=1804 audit(1624977231.252:252): pid=17998 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.4" name="/root/syzkaller-testdir073299917/syzkaller.SCOQsZ/62/bus" dev="sda1" ino=14685 res=1 netlink: 8 bytes leftover after parsing attributes in process `syz-executor.5'. VFS: unable to find oldfs superblock on device loop0 audit: type=1800 audit(1624977231.672:253): pid=18081 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.2" name="bus" dev="sda1" ino=13894 res=0 netlink: 8 bytes leftover after parsing attributes in process `syz-executor.5'. VFS: unable to find oldfs superblock on device loop0 audit: type=1804 audit(1624977231.762:254): pid=18088 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.4" name="/root/syzkaller-testdir073299917/syzkaller.SCOQsZ/63/bus" dev="sda1" ino=14691 res=1 netlink: 8 bytes leftover after parsing attributes in process `syz-executor.5'. TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending cookies. Check SNMP counters. audit: type=1800 audit(1624977231.802:255): pid=18090 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.2" name="bus" dev="sda1" ino=13970 res=0 netlink: 8 bytes leftover after parsing attributes in process `syz-executor.5'. VFS: unable to find oldfs superblock on device loop0 audit: type=1804 audit(1624977232.102:256): pid=18110 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.2" name="/root/syzkaller-testdir971569543/syzkaller.ZdPB8C/37/bus" dev="sda1" ino=13910 res=1 audit: type=1804 audit(1624977232.142:257): pid=18114 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.2" name="/root/syzkaller-testdir971569543/syzkaller.ZdPB8C/37/bus" dev="sda1" ino=13910 res=1 audit: type=1804 audit(1624977232.372:258): pid=18093 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=ToMToU comm="syz-executor.4" name="/root/syzkaller-testdir073299917/syzkaller.SCOQsZ/63/bus" dev="sda1" ino=14691 res=1 VFS: unable to find oldfs superblock on device loop0 netlink: 8 bytes leftover after parsing attributes in process `syz-executor.5'. audit: type=1804 audit(1624977233.722:259): pid=18161 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.2" name="/root/syzkaller-testdir971569543/syzkaller.ZdPB8C/39/bus" dev="sda1" ino=14307 res=1 netlink: 24 bytes leftover after parsing attributes in process `syz-executor.4'. VFS: unable to find oldfs superblock on device loop0 audit: type=1804 audit(1624977233.772:260): pid=18168 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.2" name="/root/syzkaller-testdir971569543/syzkaller.ZdPB8C/39/bus" dev="sda1" ino=14307 res=1 netlink: 24 bytes leftover after parsing attributes in process `syz-executor.4'. xt_cgroup: invalid path, errno=-2 device veth7 entered promiscuous mode xt_cgroup: invalid path, errno=-2 device veth5 entered promiscuous mode audit: type=1804 audit(1624977233.952:261): pid=18199 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.2" name="/root/syzkaller-testdir971569543/syzkaller.ZdPB8C/40/bus" dev="sda1" ino=14098 res=1 device veth5 left promiscuous mode audit: type=1804 audit(1624977234.082:262): pid=18199 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.2" name="/root/syzkaller-testdir971569543/syzkaller.ZdPB8C/40/bus" dev="sda1" ino=14098 res=1 device veth13 entered promiscuous mode overlayfs: './file0' not a directory device veth11 entered promiscuous mode device veth11 left promiscuous mode netlink: 'syz-executor.2': attribute type 10 has an invalid length. team0: Port device team_slave_1 removed bond0: Enslaving team_slave_1 as an active interface with an up link netlink: 'syz-executor.2': attribute type 10 has an invalid length. bond0: Releasing backup interface team_slave_1 device veth17 entered promiscuous mode device veth15 entered promiscuous mode netlink: 'syz-executor.2': attribute type 10 has an invalid length. device veth15 left promiscuous mode VFS: unable to find oldfs superblock on device loop0 nla_parse: 14 callbacks suppressed netlink: 24 bytes leftover after parsing attributes in process `syz-executor.4'. device veth21 entered promiscuous mode device veth19 entered promiscuous mode device veth19 left promiscuous mode netlink: 24 bytes leftover after parsing attributes in process `syz-executor.4'. audit: type=1804 audit(1624977235.692:263): pid=18394 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.2" name="/root/syzkaller-testdir971569543/syzkaller.ZdPB8C/43/file0" dev="sda1" ino=14163 res=1 netlink: 8 bytes leftover after parsing attributes in process `syz-executor.5'. netlink: 24 bytes leftover after parsing attributes in process `syz-executor.4'. audit: type=1804 audit(1624977235.782:264): pid=18394 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=ToMToU comm="syz-executor.2" name="/root/syzkaller-testdir971569543/syzkaller.ZdPB8C/43/file0" dev="sda1" ino=14163 res=1 netlink: 8 bytes leftover after parsing attributes in process `syz-executor.5'.