====================================================== WARNING: possible circular locking dependency detected 4.14.217-syzkaller #0 Not tainted ------------------------------------------------------ kworker/u4:2/27 is trying to acquire lock: (k-sk_lock-AF_INET){+.+.}, at: [] lock_sock include/net/sock.h:1471 [inline] (k-sk_lock-AF_INET){+.+.}, at: [] do_tcp_setsockopt.constprop.0+0xfb/0x1c10 net/ipv4/tcp.c:2562 but task is already holding lock: ((&(&cp->cp_send_w)->work)){+.+.}, at: [] process_one_work+0x6e6/0x14a0 kernel/workqueue.c:2091 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 ((&(&cp->cp_send_w)->work)){+.+.}: flush_work+0xad/0x770 kernel/workqueue.c:2889 __cancel_work_timer+0x321/0x460 kernel/workqueue.c:2964 rds_tcp_reset_callbacks+0x18d/0x450 net/rds/tcp.c:167 rds_tcp_accept_one+0x61a/0x8b0 net/rds/tcp_listen.c:194 rds_tcp_accept_worker+0x4d/0x70 net/rds/tcp.c:407 process_one_work+0x793/0x14a0 kernel/workqueue.c:2116 worker_thread+0x5cc/0xff0 kernel/workqueue.c:2250 kthread+0x30d/0x420 kernel/kthread.c:232 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404 -> #0 (k-sk_lock-AF_INET){+.+.}: lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3998 lock_sock_nested+0xb7/0x100 net/core/sock.c:2796 lock_sock include/net/sock.h:1471 [inline] do_tcp_setsockopt.constprop.0+0xfb/0x1c10 net/ipv4/tcp.c:2562 tcp_setsockopt net/ipv4/tcp.c:2830 [inline] tcp_setsockopt+0xa7/0xc0 net/ipv4/tcp.c:2822 kernel_setsockopt+0xfb/0x1b0 net/socket.c:3396 rds_tcp_cork net/rds/tcp_send.c:43 [inline] rds_tcp_xmit_path_prepare+0xaf/0xe0 net/rds/tcp_send.c:50 rds_send_xmit+0x1ae/0x1c00 net/rds/send.c:187 rds_send_worker+0x6d/0x240 net/rds/threads.c:189 process_one_work+0x793/0x14a0 kernel/workqueue.c:2116 worker_thread+0x5cc/0xff0 kernel/workqueue.c:2250 kthread+0x30d/0x420 kernel/kthread.c:232 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404 other info that might help us debug this: ieee80211 phy5: hwaddr 02:00:00:00:05:00 registered Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock((&(&cp->cp_send_w)->work)); lock(k-sk_lock-AF_INET); lock((&(&cp->cp_send_w)->work)); lock(k-sk_lock-AF_INET); *** DEADLOCK *** 2 locks held by kworker/u4:2/27: #0: ("%s""krdsd"){+.+.}, at: [] process_one_work+0x6b0/0x14a0 kernel/workqueue.c:2087 #1: ((&(&cp->cp_send_w)->work)){+.+.}, at: [] process_one_work+0x6e6/0x14a0 kernel/workqueue.c:2091 stack backtrace: CPU: 0 PID: 27 Comm: kworker/u4:2 Not tainted 4.14.217-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: krdsd rds_send_worker Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x1b2/0x281 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 lock_sock_nested+0xb7/0x100 net/core/sock.c:2796 lock_sock include/net/sock.h:1471 [inline] do_tcp_setsockopt.constprop.0+0xfb/0x1c10 net/ipv4/tcp.c:2562 tcp_setsockopt net/ipv4/tcp.c:2830 [inline] tcp_setsockopt+0xa7/0xc0 net/ipv4/tcp.c:2822 kernel_setsockopt+0xfb/0x1b0 net/socket.c:3396 rds_tcp_cork net/rds/tcp_send.c:43 [inline] rds_tcp_xmit_path_prepare+0xaf/0xe0 net/rds/tcp_send.c:50 rds_send_xmit+0x1ae/0x1c00 net/rds/send.c:187 rds_send_worker+0x6d/0x240 net/rds/threads.c:189 process_one_work+0x793/0x14a0 kernel/workqueue.c:2116 worker_thread+0x5cc/0xff0 kernel/workqueue.c:2250 kthread+0x30d/0x420 kernel/kthread.c:232 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404 team0: Device macsec0 is up. Set it down before adding it as a team port ieee80211 phy6: Selected rate control algorithm 'minstrel_ht' ieee80211 phy6: hwaddr 02:00:00:00:06:00 registered team0: Device macsec0 is up. Set it down before adding it as a team port team0: Device macsec0 is up. Set it down before adding it as a team port FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 1 ieee80211 phy7: Selected rate control algorithm 'minstrel_ht' CPU: 0 PID: 18787 Comm: syz-executor.4 Not tainted 4.14.217-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/0x281 lib/dump_stack.c:58 fail_dump lib/fault-inject.c:51 [inline] should_fail.cold+0x10a/0x149 lib/fault-inject.c:149 should_failslab+0xd6/0x130 mm/failslab.c:32 slab_pre_alloc_hook mm/slab.h:421 [inline] slab_alloc mm/slab.c:3376 [inline] kmem_cache_alloc_trace+0x29a/0x3d0 mm/slab.c:3616 kmalloc include/linux/slab.h:488 [inline] kzalloc include/linux/slab.h:661 [inline] sctp_association_new+0x6d/0x1e90 net/sctp/associola.c:310 sctp_sendmsg+0x1d33/0x2f30 net/sctp/socket.c:1883 inet_sendmsg+0x11a/0x4e0 net/ipv4/af_inet.c:762 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xb5/0x100 net/socket.c:656 SYSC_sendto net/socket.c:1763 [inline] SyS_sendto+0x1c7/0x2c0 net/socket.c:1731 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x45e219 RSP: 002b:00007f128dffac68 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 000000000045e219 RDX: 0000000000000001 RSI: 0000000020847fff RDI: 0000000000000003 RBP: 00007f128dffaca0 R08: 000000002005ffe4 R09: 000000000000001c R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffcdccc2e9f R14: 00007f128dffb9c0 R15: 000000000119c034 team0: Cannot enslave team device to itself ieee80211 phy7: hwaddr 02:00:00:00:07:00 registered 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: 24 bytes leftover after parsing attributes in process `syz-executor.2'. kauditd_printk_skb: 6 callbacks suppressed audit: type=1804 audit(1611499401.757:85): pid=18794 uid=0 auid=0 ses=4 op="invalid_pcr" cause="open_writers" comm="syz-executor.5" name="/root/syzkaller-testdir350444993/syzkaller.7Fev81/359/bus" dev="sda1" ino=16586 res=1 device team0 left promiscuous mode device team_slave_0 left promiscuous mode device team_slave_1 left promiscuous mode squashfs: SQUASHFS error: Can't find a SQUASHFS superblock on loop1 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 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: 24 bytes leftover after parsing attributes in process `syz-executor.2'. audit: type=1804 audit(1611499402.197:86): pid=18839 uid=0 auid=0 ses=4 op="invalid_pcr" cause="open_writers" comm="syz-executor.5" name="/root/syzkaller-testdir350444993/syzkaller.7Fev81/360/bus" dev="sda1" ino=16310 res=1 audit: type=1804 audit(1611499402.367:87): pid=18885 uid=0 auid=0 ses=4 op="invalid_pcr" cause="open_writers" comm="syz-executor.0" name="/root/syzkaller-testdir298013058/syzkaller.HDd1NZ/387/bus" dev="sda1" ino=16585 res=1 audit: type=1804 audit(1611499402.367:88): pid=18885 uid=0 auid=0 ses=4 op="invalid_pcr" cause="open_writers" comm="syz-executor.0" name="/root/syzkaller-testdir298013058/syzkaller.HDd1NZ/387/bus" dev="sda1" ino=16585 res=1 audit: type=1804 audit(1611499402.457:89): pid=18881 uid=0 auid=0 ses=4 op="invalid_pcr" cause="open_writers" comm="syz-executor.5" name="/root/syzkaller-testdir350444993/syzkaller.7Fev81/361/bus" dev="sda1" ino=16595 res=1 audit: type=1804 audit(1611499402.747:90): pid=18896 uid=0 auid=0 ses=4 op="invalid_pcr" cause="ToMToU" comm="syz-executor.0" name="/root/syzkaller-testdir298013058/syzkaller.HDd1NZ/387/bus" dev="sda1" ino=16585 res=1 EXT4-fs (loop0): unsupported inode size: 0 EXT4-fs (loop0): blocksize: 4096 EXT4-fs (loop0): unsupported inode size: 0 EXT4-fs (loop0): blocksize: 4096 print_req_error: I/O error, dev loop0, sector 0 print_req_error: I/O error, dev loop5, sector 0 SQUASHFS error: squashfs_read_data failed to read block 0x0 squashfs: SQUASHFS error: unable to read squashfs_super_block print_req_error: I/O error, dev loop5, sector 0 print_req_error: I/O error, dev loop5, sector 0 SQUASHFS error: squashfs_read_data failed to read block 0x0 squashfs: SQUASHFS error: unable to read squashfs_super_block SQUASHFS error: squashfs_read_data failed to read block 0x0 squashfs: SQUASHFS error: unable to read squashfs_super_block SQUASHFS error: squashfs_read_data failed to read block 0x0 squashfs: SQUASHFS error: unable to read squashfs_super_block SQUASHFS error: squashfs_read_data failed to read block 0x0 squashfs: SQUASHFS error: unable to read squashfs_super_block FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 0 CPU: 0 PID: 19635 Comm: syz-executor.1 Not tainted 4.14.217-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/0x281 lib/dump_stack.c:58 fail_dump lib/fault-inject.c:51 [inline] should_fail.cold+0x10a/0x149 lib/fault-inject.c:149 should_failslab+0xd6/0x130 mm/failslab.c:32 slab_pre_alloc_hook mm/slab.h:421 [inline] slab_alloc mm/slab.c:3376 [inline] __do_kmalloc mm/slab.c:3718 [inline] __kmalloc_track_caller+0x2bc/0x400 mm/slab.c:3735 memdup_user+0x22/0xa0 mm/util.c:164 strndup_user+0x5b/0xf0 mm/util.c:195 SYSC_request_key security/keys/keyctl.c:174 [inline] SyS_request_key+0xbe/0x2f0 security/keys/keyctl.c:156 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x45e219 RSP: 002b:00007fa7958eec68 EFLAGS: 00000246 ORIG_RAX: 00000000000000f9 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 000000000045e219 RDX: 0000000000000000 RSI: 0000000020001ffb RDI: 0000000020000040 RBP: 00007fa7958eeca0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffd4865d3df R14: 00007fa7958ef9c0 R15: 000000000119bf8c SQUASHFS error: squashfs_read_data failed to read block 0x0 squashfs: SQUASHFS error: unable to read squashfs_super_block squashfs: SQUASHFS error: Can't find a SQUASHFS superblock on loop0 squashfs: SQUASHFS error: Can't find a SQUASHFS superblock on loop0 squashfs: SQUASHFS error: Can't find a SQUASHFS superblock on loop0 squashfs: SQUASHFS error: Can't find a SQUASHFS superblock on loop5 squashfs: SQUASHFS error: Can't find a SQUASHFS superblock on loop5 squashfs: SQUASHFS error: Can't find a SQUASHFS superblock on loop0 squashfs: SQUASHFS error: Can't find a SQUASHFS superblock on loop0 squashfs: SQUASHFS error: Can't find a SQUASHFS superblock on loop5