====================================================== WARNING: possible circular locking dependency detected 4.14.222-syzkaller #0 Not tainted ------------------------------------------------------ kworker/u4:2/34 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:2/34: #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: 1 PID: 34 Comm: kworker/u4:2 Not tainted 4.14.222-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 audit: type=1804 audit(1614262198.969:144): pid=25848 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="ToMToU" comm="syz-executor.1" name="/root/syzkaller-testdir322301911/syzkaller.l6OC6y/366/bus" dev="sda1" ino=17154 res=1 audit: type=1804 audit(1614262198.989:145): pid=25852 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.1" name="/root/syzkaller-testdir322301911/syzkaller.l6OC6y/366/bus" dev="sda1" ino=17154 res=1 audit: type=1804 audit(1614262199.089:146): pid=25866 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.1" name="/root/syzkaller-testdir322301911/syzkaller.l6OC6y/367/bus" dev="sda1" ino=17241 res=1 audit: type=1804 audit(1614262200.209:147): pid=25980 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.1" name="/root/syzkaller-testdir322301911/syzkaller.l6OC6y/368/bus" dev="sda1" ino=17216 res=1 audit: type=1804 audit(1614262201.389:148): pid=26059 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.1" name="/root/syzkaller-testdir322301911/syzkaller.l6OC6y/369/bus" dev="sda1" ino=17247 res=1 audit: type=1800 audit(1614262202.429:149): pid=26085 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.2" name="bus" dev="sda1" ino=17277 res=0 audit: type=1800 audit(1614262202.469:150): pid=26106 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.2" name="bus" dev="sda1" ino=17277 res=0 audit: type=1800 audit(1614262202.889:151): pid=26141 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.2" name="bus" dev="sda1" ino=17281 res=0 audit: type=1800 audit(1614262203.009:152): pid=26159 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.4" name="bus" dev="sda1" ino=17009 res=0 kauditd_printk_skb: 1 callbacks suppressed audit: type=1800 audit(1614262203.519:154): pid=26206 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.1" name="bus" dev="sda1" ino=16993 res=0 audit: type=1800 audit(1614262203.539:155): pid=26209 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.2" name="bus" dev="sda1" ino=17268 res=0 audit: type=1800 audit(1614262203.579:156): pid=26207 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.4" name="bus" dev="sda1" ino=17286 res=0 audit: type=1800 audit(1614262203.739:157): pid=26225 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.5" name="bus" dev="sda1" ino=17267 res=0 audit: type=1800 audit(1614262203.829:158): pid=26231 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.1" name="bus" dev="sda1" ino=17286 res=0 audit: type=1800 audit(1614262203.909:159): pid=26244 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.4" name="bus" dev="sda1" ino=17271 res=0 IPVS: ftp: loaded support on port[0] = 21 audit: type=1800 audit(1614262203.959:160): pid=26240 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.0" name="bus" dev="sda1" ino=17266 res=0 audit: type=1800 audit(1614262204.149:161): pid=26257 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.5" name="bus" dev="sda1" ino=17282 res=0 audit: type=1800 audit(1614262204.169:162): pid=26263 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.1" name="bus" dev="sda1" ino=17284 res=0 audit: type=1800 audit(1614262204.369:163): pid=26275 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.0" name="bus" dev="sda1" ino=17285 res=0 IPVS: ftp: loaded support on port[0] = 21 IPVS: ftp: loaded support on port[0] = 21 IPVS: ftp: loaded support on port[0] = 21 IPVS: ftp: loaded support on port[0] = 21 IPVS: ftp: loaded support on port[0] = 21 IPVS: ftp: loaded support on port[0] = 21