====================================================== WARNING: possible circular locking dependency detected 4.14.214-syzkaller #0 Not tainted netlink: 6 bytes leftover after parsing attributes in process `syz-executor.5'. ------------------------------------------------------ syz-executor.4/14371 is trying to acquire lock: (&oi->lock){+.+.}, at: [] ovl_copy_up_start+0x40/0xe0 fs/overlayfs/util.c:318 but task is already holding lock: chnl_net:chnl_net_open(): err: Unable to register and open device, Err:-19 (sb_writers#6){.+.+}, at: [] sb_start_write include/linux/fs.h:1549 [inline] (sb_writers#6){.+.+}, at: [] mnt_want_write+0x3a/0xb0 fs/namespace.c:386 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (sb_writers#6){.+.+}: percpu_down_read_preempt_disable include/linux/percpu-rwsem.h:36 [inline] percpu_down_read include/linux/percpu-rwsem.h:59 [inline] __sb_start_write+0x64/0x260 fs/super.c:1342 sb_start_write include/linux/fs.h:1549 [inline] mnt_want_write+0x3a/0xb0 fs/namespace.c:386 ovl_xattr_set+0x4d/0x270 fs/overlayfs/inode.c:214 ovl_posix_acl_xattr_set+0x2b7/0x830 fs/overlayfs/super.c:762 __vfs_setxattr+0xdc/0x130 fs/xattr.c:150 __vfs_setxattr_noperm+0xfd/0x3d0 fs/xattr.c:181 __vfs_setxattr_locked+0x14d/0x250 fs/xattr.c:239 vfs_setxattr+0xcf/0x230 fs/xattr.c:256 setxattr+0x1a9/0x300 fs/xattr.c:523 path_setxattr+0x118/0x130 fs/xattr.c:542 SYSC_setxattr fs/xattr.c:557 [inline] SyS_setxattr+0x36/0x50 fs/xattr.c:553 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb -> #1 (&ovl_i_mutex_dir_key[depth]#2){++++}: down_read+0x36/0x80 kernel/locking/rwsem.c:24 inode_lock_shared include/linux/fs.h:729 [inline] lookup_slow+0x129/0x400 fs/namei.c:1674 lookup_one_len_unlocked+0x3a0/0x410 fs/namei.c:2595 ovl_lower_positive+0x184/0x345 fs/overlayfs/namei.c:783 ovl_rename+0x47c/0xf10 fs/overlayfs/dir.c:968 vfs_rename+0x560/0x1820 fs/namei.c:4496 SYSC_renameat2 fs/namei.c:4644 [inline] SyS_renameat2+0x95b/0xad0 fs/namei.c:4533 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb -> #0 (&oi->lock){+.+.}: lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3998 __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0xc4/0x1310 kernel/locking/mutex.c:893 ovl_copy_up_start+0x40/0xe0 fs/overlayfs/util.c:318 ovl_copy_up_one+0x21f/0x910 fs/overlayfs/copy_up.c:630 ovl_copy_up_flags+0xd5/0x120 fs/overlayfs/copy_up.c:685 ovl_xattr_set+0x189/0x270 fs/overlayfs/inode.c:225 ovl_posix_acl_xattr_set+0x2b7/0x830 fs/overlayfs/super.c:762 __vfs_setxattr+0xdc/0x130 fs/xattr.c:150 __vfs_setxattr_noperm+0xfd/0x3d0 fs/xattr.c:181 __vfs_setxattr_locked+0x14d/0x250 fs/xattr.c:239 vfs_setxattr+0xcf/0x230 fs/xattr.c:256 setxattr+0x1a9/0x300 fs/xattr.c:523 path_setxattr+0x118/0x130 fs/xattr.c:542 SYSC_setxattr fs/xattr.c:557 [inline] SyS_setxattr+0x36/0x50 fs/xattr.c:553 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb other info that might help us debug this: Chain exists of: &oi->lock --> &ovl_i_mutex_dir_key[depth]#2 --> sb_writers#6 Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(sb_writers#6); lock(&ovl_i_mutex_dir_key[depth]#2); lock(sb_writers#6); lock(&oi->lock); *** DEADLOCK *** 3 locks held by syz-executor.4/14371: #0: (sb_writers#18){.+.+}, at: [] sb_start_write include/linux/fs.h:1549 [inline] #0: (sb_writers#18){.+.+}, at: [] mnt_want_write+0x3a/0xb0 fs/namespace.c:386 #1: (&ovl_i_mutex_dir_key[depth]#2){++++}, at: [] inode_lock include/linux/fs.h:719 [inline] #1: (&ovl_i_mutex_dir_key[depth]#2){++++}, at: [] vfs_setxattr+0xb1/0x230 fs/xattr.c:255 #2: (sb_writers#6){.+.+}, at: [] sb_start_write include/linux/fs.h:1549 [inline] #2: (sb_writers#6){.+.+}, at: [] mnt_want_write+0x3a/0xb0 fs/namespace.c:386 stack backtrace: CPU: 0 PID: 14371 Comm: syz-executor.4 Not tainted 4.14.214-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x1b2/0x283 lib/dump_stack.c:58 print_circular_bug.constprop.0.cold+0x2d7/0x41e kernel/locking/lockdep.c:1258 check_prev_add kernel/locking/lockdep.c:1905 [inline] check_prevs_add kernel/locking/lockdep.c:2022 [inline] validate_chain kernel/locking/lockdep.c:2464 [inline] __lock_acquire+0x2e0e/0x3f20 kernel/locking/lockdep.c:3491 lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3998 __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0xc4/0x1310 kernel/locking/mutex.c:893 ovl_copy_up_start+0x40/0xe0 fs/overlayfs/util.c:318 ovl_copy_up_one+0x21f/0x910 fs/overlayfs/copy_up.c:630 ovl_copy_up_flags+0xd5/0x120 fs/overlayfs/copy_up.c:685 ovl_xattr_set+0x189/0x270 fs/overlayfs/inode.c:225 ovl_posix_acl_xattr_set+0x2b7/0x830 fs/overlayfs/super.c:762 __vfs_setxattr+0xdc/0x130 fs/xattr.c:150 __vfs_setxattr_noperm+0xfd/0x3d0 fs/xattr.c:181 __vfs_setxattr_locked+0x14d/0x250 fs/xattr.c:239 vfs_setxattr+0xcf/0x230 fs/xattr.c:256 setxattr+0x1a9/0x300 fs/xattr.c:523 path_setxattr+0x118/0x130 fs/xattr.c:542 SYSC_setxattr fs/xattr.c:557 [inline] SyS_setxattr+0x36/0x50 fs/xattr.c:553 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x45e219 RSP: 002b:00007f37c45c0c68 EFLAGS: 00000246 ORIG_RAX: 00000000000000bc RAX: ffffffffffffffda RBX: 0000000000000005 RCX: 000000000045e219 RDX: 0000000020000500 RSI: 0000000020000440 RDI: 00000000200003c0 RBP: 000000000119bfd0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000024 R11: 0000000000000246 R12: 000000000119bf8c R13: 00007ffe78f94b3f R14: 00007f37c45c19c0 R15: 000000000119bf8c caif:caif_disconnect_client(): nothing to disconnect chnl_net:chnl_flowctrl_cb(): NET flowctrl func called flow: CLOSE/DEINIT chnl_net:chnl_net_open(): state disconnected A link change request failed with some changes committed already. Interface caif0 may have been left with an inconsistent configuration, please check. overlayfs: filesystem on './file0' not supported as upperdir netlink: 6 bytes leftover after parsing attributes in process `syz-executor.5'. chnl_net:chnl_net_open(): err: Unable to register and open device, Err:-19 caif:caif_disconnect_client(): nothing to disconnect chnl_net:chnl_flowctrl_cb(): NET flowctrl func called flow: CLOSE/DEINIT chnl_net:chnl_net_open(): state disconnected A link change request failed with some changes committed already. Interface caif0 may have been left with an inconsistent configuration, please check. netlink: 12 bytes leftover after parsing attributes in process `syz-executor.4'. device team0 left promiscuous mode device team_slave_0 left promiscuous mode device team_slave_1 left promiscuous mode bridge0: port 3(team0) entered disabled state team0: Cannot enslave team device to itself netlink: 12 bytes leftover after parsing attributes in process `syz-executor.4'. bridge0: port 3(team0) entered blocking state bridge0: port 3(team0) entered disabled state device team0 entered promiscuous mode device team_slave_0 entered promiscuous mode device team_slave_1 entered promiscuous mode bridge0: port 3(team0) entered blocking state bridge0: port 3(team0) entered forwarding state netlink: 12 bytes leftover after parsing attributes in process `syz-executor.4'. netlink: 12 bytes leftover after parsing attributes in process `syz-executor.4'. device team0 left promiscuous mode device team_slave_0 left promiscuous mode device team_slave_1 left promiscuous mode bridge0: port 3(team0) entered disabled state team0: Cannot enslave team device to itself bridge0: port 3(team0) entered blocking state bridge0: port 3(team0) entered disabled state print_req_error: I/O error, dev loop4, sector 2 Buffer I/O error on dev loop4, logical block 2, async page read print_req_error: I/O error, dev loop4, sector 3 Buffer I/O error on dev loop4, logical block 3, async page read device team0 entered promiscuous mode print_req_error: I/O error, dev loop4, sector 4 Buffer I/O error on dev loop4, logical block 4, async page read device team_slave_0 entered promiscuous mode print_req_error: I/O error, dev loop4, sector 5 device team_slave_1 entered promiscuous mode Buffer I/O error on dev loop4, logical block 5, async page read print_req_error: I/O error, dev loop4, sector 6 Buffer I/O error on dev loop4, logical block 6, async page read print_req_error: I/O error, dev loop4, sector 7 Buffer I/O error on dev loop4, logical block 7, async page read bridge0: port 3(team0) entered blocking state bridge0: port 3(team0) entered forwarding state print_req_error: I/O error, dev loop4, sector 2 Buffer I/O error on dev loop4, logical block 2, async page read print_req_error: I/O error, dev loop4, sector 3 Buffer I/O error on dev loop4, logical block 3, async page read print_req_error: I/O error, dev loop4, sector 4 Buffer I/O error on dev loop4, logical block 4, async page read print_req_error: I/O error, dev loop4, sector 5 Buffer I/O error on dev loop4, logical block 5, async page read audit: type=1804 audit(1610205542.141:96): pid=14651 uid=0 auid=0 ses=4 op="invalid_pcr" cause="open_writers" comm="syz-executor.3" name="/root/syzkaller-testdir957674730/syzkaller.HqVgys/155/bus" dev="sda1" ino=16359 res=1 audit: type=1804 audit(1610205542.221:97): pid=14658 uid=0 auid=0 ses=4 op="invalid_pcr" cause="ToMToU" comm="syz-executor.3" name="/root/syzkaller-testdir957674730/syzkaller.HqVgys/155/bus" dev="sda1" ino=16359 res=1 audit: type=1804 audit(1610205542.831:98): pid=14651 uid=0 auid=0 ses=4 op="invalid_pcr" cause="open_writers" comm="syz-executor.3" name="/root/syzkaller-testdir957674730/syzkaller.HqVgys/155/bus" dev="sda1" ino=16359 res=1 audit: type=1804 audit(1610205542.831:99): pid=14647 uid=0 auid=0 ses=4 op="invalid_pcr" cause="ToMToU" comm="syz-executor.3" name="/root/syzkaller-testdir957674730/syzkaller.HqVgys/155/bus" dev="sda1" ino=16359 res=1 audit: type=1804 audit(1610205543.101:100): pid=14700 uid=0 auid=0 ses=4 op="invalid_pcr" cause="open_writers" comm="syz-executor.3" name="/root/syzkaller-testdir957674730/syzkaller.HqVgys/156/bus" dev="sda1" ino=16374 res=1 audit: type=1804 audit(1610205543.131:101): pid=14712 uid=0 auid=0 ses=4 op="invalid_pcr" cause="open_writers" comm="syz-executor.4" name="/root/syzkaller-testdir106233592/syzkaller.3MZ5Xo/175/bus" dev="sda1" ino=16375 res=1 audit: type=1804 audit(1610205543.151:102): pid=14713 uid=0 auid=0 ses=4 op="invalid_pcr" cause="ToMToU" comm="syz-executor.3" name="/root/syzkaller-testdir957674730/syzkaller.HqVgys/156/bus" dev="sda1" ino=16374 res=1 audit: type=1804 audit(1610205543.181:103): pid=14717 uid=0 auid=0 ses=4 op="invalid_pcr" cause="ToMToU" comm="syz-executor.4" name="/root/syzkaller-testdir106233592/syzkaller.3MZ5Xo/175/bus" dev="sda1" ino=16375 res=1 audit: type=1804 audit(1610205543.581:104): pid=14727 uid=0 auid=0 ses=4 op="invalid_pcr" cause="open_writers" comm="syz-executor.5" name="/root/syzkaller-testdir391770028/syzkaller.Etq8mu/154/bus" dev="sda1" ino=16348 res=1 audit: type=1804 audit(1610205543.781:105): pid=14728 uid=0 auid=0 ses=4 op="invalid_pcr" cause="ToMToU" comm="syz-executor.5" name="/root/syzkaller-testdir391770028/syzkaller.Etq8mu/154/bus" dev="sda1" ino=16348 res=1 EXT4-fs warning (device sda1): verify_group_input:131: Cannot add at group 3 (only 16 groups) EXT4-fs (loop2): mounted filesystem without journal. Opts: ,errors=continue EXT4-fs (loop2): mounted filesystem without journal. Opts: ,errors=continue sd 0:0:1:0: PR command failed: 134217730 sd 0:0:1:0: Sense Key : Illegal Request [current] sd 0:0:1:0: Add. Sense: Invalid command operation code sd 0:0:1:0: PR command failed: 134217730 sd 0:0:1:0: Sense Key : Illegal Request [current] sd 0:0:1:0: Add. Sense: Invalid command operation code sd 0:0:1:0: PR command failed: 134217730 sd 0:0:1:0: Sense Key : Illegal Request [current] sd 0:0:1:0: Add. Sense: Invalid command operation code kauditd_printk_skb: 10 callbacks suppressed audit: type=1804 audit(1610205548.021:116): pid=14880 uid=0 auid=0 ses=4 op="invalid_pcr" cause="open_writers" comm="syz-executor.3" name="/root/syzkaller-testdir957674730/syzkaller.HqVgys/158/bus" dev="sda1" ino=16384 res=1 audit: type=1804 audit(1610205548.101:117): pid=14881 uid=0 auid=0 ses=4 op="invalid_pcr" cause="ToMToU" comm="syz-executor.3" name="/root/syzkaller-testdir957674730/syzkaller.HqVgys/158/bus" dev="sda1" ino=16384 res=1 EXT4-fs (loop2): cluster size (2048) smaller than block size (4096) sd 0:0:1:0: PR command failed: 134217730 sd 0:0:1:0: Sense Key : Illegal Request [current]