====================================================== WARNING: possible circular locking dependency detected 4.14.213-syzkaller #0 Not tainted ------------------------------------------------------ kworker/u4:5/8966 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: 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:5/8966: #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: 8966 Comm: kworker/u4:5 Not tainted 4.14.213-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/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 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 caif:caif_disconnect_client(): nothing to disconnect caif:caif_disconnect_client(): nothing to disconnect caif:caif_disconnect_client(): nothing to disconnect caif:caif_disconnect_client(): nothing to disconnect Dev loop3: unable to read RDB block 1 loop3: unable to read partition table netlink: 24 bytes leftover after parsing attributes in process `syz-executor.3'. loop3: partition table beyond EOD, truncated loop_reread_partitions: partition scan of loop3 () failed (rc=-5) device veth3 entered promiscuous mode IPv6: ADDRCONF(NETDEV_UP): veth3: link is not ready netlink: 24 bytes leftover after parsing attributes in process `syz-executor.0'. Dev loop3: unable to read RDB block 1 loop3: unable to read partition table loop3: partition table beyond EOD, truncated loop_reread_partitions: partition scan of loop3 () failed (rc=-5) netlink: 4 bytes leftover after parsing attributes in process `syz-executor.0'. netlink: 24 bytes leftover after parsing attributes in process `syz-executor.3'. device veth4 entered promiscuous mode IPv6: ADDRCONF(NETDEV_UP): veth4: link is not ready netlink: 24 bytes leftover after parsing attributes in process `syz-executor.0'. Dev loop3: unable to read RDB block 1 loop3: unable to read partition table netlink: 24 bytes leftover after parsing attributes in process `syz-executor.3'. loop3: partition table beyond EOD, truncated loop_reread_partitions: partition scan of loop3 () failed (rc=-5) Cannot find del_set index 0 as target device veth5 entered promiscuous mode Cannot find del_set index 0 as target IPv6: ADDRCONF(NETDEV_UP): veth5: link is not ready Dev loop3: unable to read RDB block 1 loop3: unable to read partition table netlink: 24 bytes leftover after parsing attributes in process `syz-executor.3'. loop3: partition table beyond EOD, truncated loop_reread_partitions: partition scan of loop3 () failed (rc=-5) device veth6 entered promiscuous mode IPv6: ADDRCONF(NETDEV_UP): veth6: link is not ready syz-executor.4 (12506): drop_caches: 2 syz-executor.4 (12497): drop_caches: 2 Dev loop3: unable to read RDB block 1 loop3: unable to read partition table netlink: 24 bytes leftover after parsing attributes in process `syz-executor.3'. loop3: partition table beyond EOD, truncated loop_reread_partitions: partition scan of loop3 () failed (rc=-5) device veth7 entered promiscuous mode IPv6: ADDRCONF(NETDEV_UP): veth7: link is not ready print_req_error: I/O error, dev loop4, sector 0 Dev loop3: unable to read RDB block 1 loop3: unable to read partition table netlink: 24 bytes leftover after parsing attributes in process `syz-executor.3'. loop3: partition table beyond EOD, ISOFS: Unable to identify CD-ROM format. truncated loop_reread_partitions: partition scan of loop3 () failed (rc=-5) ISOFS: Unable to identify CD-ROM format. device veth8 entered promiscuous mode IPv6: ADDRCONF(NETDEV_UP): veth8: link is not ready IPVS: ftp: loaded support on port[0] = 21 Dev loop3: unable to read RDB block 1 loop3: unable to read partition table audit: type=1804 audit(1609756537.032:41): pid=12824 uid=0 auid=0 ses=4 op="invalid_pcr" cause="open_writers" comm="syz-executor.4" name="/root/syzkaller-testdir699196553/syzkaller.TQ514S/64/file0" dev="sda1" ino=16102 res=1 loop3: partition table beyond EOD, truncated netlink: 24 bytes leftover after parsing attributes in process `syz-executor.3'. loop_reread_partitions: partition scan of loop3 () failed (rc=-5) device veth9 entered promiscuous mode IPv6: ADDRCONF(NETDEV_UP): veth9: link is not ready IPVS: ftp: loaded support on port[0] = 21 Dev loop3: unable to read RDB block 1 loop3: unable to read partition table loop3: partition table beyond EOD, truncated loop_reread_partitions: partition scan of loop3 () failed (rc=-5) device veth10 entered promiscuous mode IPv6: ADDRCONF(NETDEV_UP): veth10: link is not ready Dev loop3: unable to read RDB block 1 loop3: unable to read partition table loop3: partition table beyond EOD, truncated loop_reread_partitions: partition scan of loop3 () failed (rc=-5) audit: type=1326 audit(1609756537.882:42): auid=0 uid=0 gid=0 ses=4 pid=12983 comm="syz-executor.5" exe="/root/syz-executor.5" sig=9 arch=c000003e syscall=228 compat=0 ip=0x46107a code=0x0 device veth11 entered promiscuous mode audit: type=1804 audit(1609756537.942:43): pid=12991 uid=0 auid=0 ses=4 op="invalid_pcr" cause="open_writers" comm="syz-executor.5" name="/root/syzkaller-testdir022613965/syzkaller.a0lDUV/59/bus" dev="sda1" ino=16111 res=1 IPv6: ADDRCONF(NETDEV_UP): veth11: link is not ready audit: type=1804 audit(1609756537.942:44): pid=12991 uid=0 auid=0 ses=4 op="invalid_pcr" cause="open_writers" comm="syz-executor.5" name="/root/syzkaller-testdir022613965/syzkaller.a0lDUV/59/bus" dev="sda1" ino=16111 res=1 Dev loop3: unable to read RDB block 1 loop3: unable to read partition table loop3: partition table beyond EOD, truncated nla_parse: 2 callbacks suppressed netlink: 24 bytes leftover after parsing attributes in process `syz-executor.3'. loop_reread_partitions: partition scan of loop3 () failed (rc=-5) device veth12 entered promiscuous mode IPv6: ADDRCONF(NETDEV_UP): veth12: link is not ready audit: type=1326 audit(1609756538.712:45): auid=0 uid=0 gid=0 ses=4 pid=12983 comm="syz-executor.5" exe="/root/syz-executor.5" sig=9 arch=c000003e syscall=228 compat=0 ip=0x46107a code=0x0 audit: type=1804 audit(1609756538.732:46): pid=13065 uid=0 auid=0 ses=4 op="invalid_pcr" cause="open_writers" comm="syz-executor.5" name="/root/syzkaller-testdir022613965/syzkaller.a0lDUV/59/bus" dev="sda1" ino=16111 res=1 audit: type=1804 audit(1609756538.742:47): pid=13064 uid=0 auid=0 ses=4 op="invalid_pcr" cause="open_writers" comm="syz-executor.5" name="/root/syzkaller-testdir022613965/syzkaller.a0lDUV/59/bus" dev="sda1" ino=16111 res=1 audit: type=1804 audit(1609756538.742:48): pid=13066 uid=0 auid=0 ses=4 op="invalid_pcr" cause="open_writers" comm="syz-executor.5" name="/root/syzkaller-testdir022613965/syzkaller.a0lDUV/59/bus" dev="sda1" ino=16111 res=1 audit: type=1804 audit(1609756539.412:49): pid=13075 uid=0 auid=0 ses=4 op="invalid_pcr" cause="open_writers" comm="syz-executor.4" name="/root/syzkaller-testdir699196553/syzkaller.TQ514S/64/file0" dev="sda1" ino=16102 res=1 netlink: 24 bytes leftover after parsing attributes in process `syz-executor.0'. FAT-fs (loop1): Unrecognized mount option "" or missing value audit: type=1326 audit(1609756539.492:50): auid=0 uid=0 gid=0 ses=4 pid=13079 comm="syz-executor.5" exe="/root/syz-executor.5" sig=9 arch=c000003e syscall=228 compat=0 ip=0x46107a code=0x0 Dev loop3: unable to read RDB block 1 loop3: unable to read partition table loop3: partition table beyond EOD, truncated netlink: 24 bytes leftover after parsing attributes in process `syz-executor.3'. FAT-fs (loop1): Unrecognized mount option "" or missing value loop_reread_partitions: partition scan of loop3 () failed (rc=-5) device veth13 entered promiscuous mode IPv6: ADDRCONF(NETDEV_UP): veth13: link is not ready netlink: 20 bytes leftover after parsing attributes in process `syz-executor.1'. Dev loop3: unable to read RDB block 1 loop3: unable to read partition table netlink: 24 bytes leftover after parsing attributes in process `syz-executor.3'. loop3: partition table beyond EOD, truncated loop_reread_partitions: partition scan of loop3 () failed (rc=-5) device veth14 entered promiscuous mode IPv6: ADDRCONF(NETDEV_UP): veth14: link is not ready Dev loop3: unable to read RDB block 1 loop3: unable to read partition table loop3: partition table beyond EOD, truncated loop_reread_partitions: partition scan of loop3 () failed (rc=-5) EXT4-fs (loop1): mounted filesystem without journal. Opts: ,errors=continue Dev loop3: unable to read RDB block 1 loop3: unable to read partition table loop3: partition table beyond EOD, truncated NFQUEUE: number of total queues is 0 loop_reread_partitions: partition scan of loop3 () failed (rc=-5) NFQUEUE: number of total queues is 0 Dev loop3: unable to read RDB block 1 loop3: unable to read partition table loop3: partition table beyond EOD, truncated Dev loop3: unable to read RDB block 1 loop3: unable to read partition table loop3: partition table beyond EOD, truncated loop_reread_partitions: partition scan of loop3 () failed (rc=-5) netlink: 24 bytes leftover after parsing attributes in process `syz-executor.3'. device veth15 entered promiscuous mode IPv6: ADDRCONF(NETDEV_UP): veth15: link is not ready