====================================================== WARNING: possible circular locking dependency detected 4.14.290-syzkaller #0 Not tainted ------------------------------------------------------ kworker/u4:5/9300 is trying to acquire lock: ((&(&cp->cp_send_w)->work)){+.+.}, at: [] flush_work+0x88/0x770 kernel/workqueue.c:2887 but task is already holding lock: (k-sk_lock-AF_INET){+.+.}, at: [] lock_sock include/net/sock.h:1473 [inline] (k-sk_lock-AF_INET){+.+.}, at: [] rds_tcp_reset_callbacks+0x181/0x450 net/rds/tcp.c:165 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (k-sk_lock-AF_INET){+.+.}: lock_sock_nested+0xb7/0x100 net/core/sock.c:2813 lock_sock include/net/sock.h:1473 [inline] do_tcp_setsockopt.constprop.0+0xfb/0x1c10 net/ipv4/tcp.c:2564 tcp_setsockopt net/ipv4/tcp.c:2832 [inline] tcp_setsockopt+0xa7/0xc0 net/ipv4/tcp.c:2824 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:2117 worker_thread+0x5cc/0xff0 kernel/workqueue.c:2251 kthread+0x30d/0x420 kernel/kthread.c:232 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404 -> #0 ((&(&cp->cp_send_w)->work)){+.+.}: lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3998 flush_work+0xad/0x770 kernel/workqueue.c:2890 __cancel_work_timer+0x321/0x460 kernel/workqueue.c:2965 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:2117 worker_thread+0x5cc/0xff0 kernel/workqueue.c:2251 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(k-sk_lock-AF_INET); lock((&(&cp->cp_send_w)->work)); lock(k-sk_lock-AF_INET); lock((&(&cp->cp_send_w)->work)); *** DEADLOCK *** 4 locks held by kworker/u4:5/9300: #0: ("%s""krdsd"){+.+.}, at: [] process_one_work+0x6b0/0x14a0 kernel/workqueue.c:2088 #1: ((&rtn->rds_tcp_accept_w)){+.+.}, at: [] process_one_work+0x6e6/0x14a0 kernel/workqueue.c:2092 #2: (&tc->t_conn_path_lock){+.+.}, at: [] rds_tcp_accept_one+0x502/0x8b0 net/rds/tcp_listen.c:186 #3: (k-sk_lock-AF_INET){+.+.}, at: [] lock_sock include/net/sock.h:1473 [inline] #3: (k-sk_lock-AF_INET){+.+.}, at: [] rds_tcp_reset_callbacks+0x181/0x450 net/rds/tcp.c:165 stack backtrace: CPU: 0 PID: 9300 Comm: kworker/u4:5 Not tainted 4.14.290-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/22/2022 Workqueue: krdsd rds_tcp_accept_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 flush_work+0xad/0x770 kernel/workqueue.c:2890 __cancel_work_timer+0x321/0x460 kernel/workqueue.c:2965 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:2117 worker_thread+0x5cc/0xff0 kernel/workqueue.c:2251 kthread+0x30d/0x420 kernel/kthread.c:232 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404 ldm_validate_privheads(): Disk read failed. loop1: p2 < > p4 loop1: partition table partially beyond EOD, truncated loop1: p4 size 2097152 extends beyond EOD, truncated ldm_validate_privheads(): Disk read failed. loop1: p2 < > p4 loop1: partition table partially beyond EOD, truncated loop1: p4 size 2097152 extends beyond EOD, truncated ldm_validate_privheads(): Disk read failed. loop5: p2 < > p4 loop5: partition table partially beyond EOD, truncated loop_reread_partitions: partition scan of loop1 () failed (rc=-16) print_req_error: I/O error, dev loop1, sector 0 loop5: p4 size 2097152 extends beyond EOD, truncated print_req_error: I/O error, dev loop1, sector 0 Buffer I/O error on dev loop1p4, logical block 0, async page read print_req_error: I/O error, dev loop1, sector 1 Buffer I/O error on dev loop1p4, logical block 1, async page read print_req_error: I/O error, dev loop1, sector 2 Buffer I/O error on dev loop1p4, logical block 2, async page read print_req_error: I/O error, dev loop1, sector 3 Buffer I/O error on dev loop1p4, logical block 3, async page read print_req_error: I/O error, dev loop1, sector 4 Buffer I/O error on dev loop1p4, logical block 4, async page read print_req_error: I/O error, dev loop1, sector 0 print_req_error: I/O error, dev loop1, sector 0 Buffer I/O error on dev loop1p4, logical block 0, async page read print_req_error: I/O error, dev loop1, sector 1 Buffer I/O error on dev loop1p4, logical block 1, async page read print_req_error: I/O error, dev loop1, sector 2 Buffer I/O error on dev loop1p4, logical block 2, async page read Buffer I/O error on dev loop1p4, logical block 3, async page read Buffer I/O error on dev loop1p2, logical block 0, async page read ldm_validate_privheads(): Disk read failed. ldm_validate_privheads(): Disk read failed. loop5: p2 < > p4 loop1: p2 < > p4 loop1: partition table partially beyond EOD, truncated loop5: partition table partially beyond EOD, truncated loop1: p4 size 2097152 extends beyond EOD, truncated loop5: p4 size 2097152 extends beyond EOD, truncated loop_reread_partitions: partition scan of loop5 () failed (rc=-16) ldm_validate_privheads(): Disk read failed. loop1: p2 < > p4 loop1: partition table partially beyond EOD, truncated loop1: p4 size 2097152 extends beyond EOD, truncated ldm_validate_privheads(): Disk read failed. loop5: p2 < > p4 loop5: partition table partially beyond EOD, truncated loop5: p4 size 2097152 extends beyond EOD, truncated overlayfs: fs on 'file0' does not support file handles, falling back to index=off. overlayfs: fs on './file0' does not support file handles, falling back to index=off. PM: Starting manual resume from disk PM: Image not found (code -22) PM: Starting manual resume from disk PM: Image not found (code -22) overlayfs: fs on 'file0' does not support file handles, falling back to index=off. PM: Starting manual resume from disk PM: Image not found (code -22) overlayfs: fs on 'file0' does not support file handles, falling back to index=off. overlayfs: fs on './file0' does not support file handles, falling back to index=off. overlayfs: fs on './file0' does not support file handles, falling back to index=off. PM: Starting manual resume from disk PM: Image not found (code -22) overlayfs: fs on 'file0' does not support file handles, falling back to index=off. overlayfs: fs on 'file0' does not support file handles, falling back to index=off. overlayfs: fs on './file0' does not support file handles, falling back to index=off. overlayfs: fs on 'file0' does not support file handles, falling back to index=off. overlayfs: fs on 'file0' does not support file handles, falling back to index=off. overlayfs: fs on 'file0' does not support file handles, falling back to index=off. overlayfs: fs on 'file0' does not support file handles, falling back to index=off. overlayfs: fs on './file0' does not support file handles, falling back to index=off. overlayfs: fs on './file0' does not support file handles, falling back to index=off. overlayfs: fs on './file0' does not support file handles, falling back to index=off. overlayfs: fs on './file0' does not support file handles, falling back to index=off. overlayfs: fs on './file0' does not support file handles, falling back to index=off. overlayfs: fs on 'file0' does not support file handles, falling back to index=off. overlayfs: fs on './file0' does not support file handles, falling back to index=off. overlayfs: fs on 'file0' does not support file handles, falling back to index=off. overlayfs: fs on 'file0' does not support file handles, falling back to index=off. overlayfs: fs on 'file0' does not support file handles, falling back to index=off. overlayfs: fs on './file0' does not support file handles, falling back to index=off. overlayfs: fs on './file0' does not support file handles, falling back to index=off. overlayfs: fs on './file0' does not support file handles, falling back to index=off. overlayfs: fs on 'file0' does not support file handles, falling back to index=off. overlayfs: fs on 'file0' does not support file handles, falling back to index=off. overlayfs: fs on 'file0' does not support file handles, falling back to index=off. overlayfs: fs on './file0' does not support file handles, falling back to index=off. overlayfs: fs on './file0' does not support file handles, falling back to index=off. overlayfs: fs on 'file0' does not support file handles, falling back to index=off. overlayfs: fs on './file0' does not support file handles, falling back to index=off. overlayfs: fs on 'file0' does not support file handles, falling back to index=off. overlayfs: fs on './file0' does not support file handles, falling back to index=off. overlayfs: fs on './file0' does not support file handles, falling back to index=off. overlayfs: fs on 'file0' does not support file handles, falling back to index=off. BTRFS: device fsid e3ec2bde-7b17-4f16-9be4-1e03b986a28d devid 1 transid 7 /dev/loop1 BTRFS error (device loop1): unsupported checksum algorithm 1 audit: type=1804 audit(1660257240.934:19): pid=13778 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.5" name="/root/syzkaller-testdir2260518075/syzkaller.AIwPRk/136/file0/bus" dev="ramfs" ino=41651 res=1 overlayfs: fs on './file0' does not support file handles, falling back to index=off. BTRFS error (device loop1): superblock checksum mismatch audit: type=1804 audit(1660257240.934:20): pid=13778 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="ToMToU" comm="syz-executor.5" name="/root/syzkaller-testdir2260518075/syzkaller.AIwPRk/136/file0/bus" dev="ramfs" ino=41651 res=1 serio: Serial port pts0 BTRFS error (device loop1): open_ctree failed BTRFS error (device loop1): unsupported checksum algorithm 1 audit: type=1804 audit(1660257241.194:21): pid=13823 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.5" name="/root/syzkaller-testdir2260518075/syzkaller.AIwPRk/137/file0/bus" dev="ramfs" ino=42232 res=1 audit: type=1804 audit(1660257241.194:22): pid=13823 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="ToMToU" comm="syz-executor.5" name="/root/syzkaller-testdir2260518075/syzkaller.AIwPRk/137/file0/bus" dev="ramfs" ino=42232 res=1 BTRFS error (device loop1): superblock checksum mismatch BTRFS error (device loop1): open_ctree failed serio: Serial port pts0 audit: type=1804 audit(1660257241.324:23): pid=13849 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.5" name="/root/syzkaller-testdir2260518075/syzkaller.AIwPRk/138/file0/bus" dev="ramfs" ino=41727 res=1 audit: type=1804 audit(1660257241.364:24): pid=13849 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="ToMToU" comm="syz-executor.5" name="/root/syzkaller-testdir2260518075/syzkaller.AIwPRk/138/file0/bus" dev="ramfs" ino=41727 res=1 BTRFS error (device loop1): unsupported checksum algorithm 1 BTRFS error (device loop1): superblock checksum mismatch BTRFS error (device loop1): open_ctree failed audit: type=1804 audit(1660257241.514:25): pid=13878 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.5" name="/root/syzkaller-testdir2260518075/syzkaller.AIwPRk/139/file0/bus" dev="ramfs" ino=41758 res=1 serio: Serial port pts0 audit: type=1804 audit(1660257241.514:26): pid=13878 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="ToMToU" comm="syz-executor.5" name="/root/syzkaller-testdir2260518075/syzkaller.AIwPRk/139/file0/bus" dev="ramfs" ino=41758 res=1 BTRFS error (device loop1): unsupported checksum algorithm 1 BTRFS error (device loop1): superblock checksum mismatch BTRFS error (device loop1): open_ctree failed serio: Serial port pts1 serio: Serial port pts0 serio: Serial port pts2 serio: Serial port pts3 serio: Serial port pts1 serio: Serial port pts0 serio: Serial port pts2 audit: type=1804 audit(1660257242.004:27): pid=13976 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.4" name="/root/syzkaller-testdir1780348349/syzkaller.1p01Kx/172/file0/bus" dev="ramfs" ino=41879 res=1 audit: type=1804 audit(1660257242.004:28): pid=13976 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="ToMToU" comm="syz-executor.4" name="/root/syzkaller-testdir1780348349/syzkaller.1p01Kx/172/file0/bus" dev="ramfs" ino=41879 res=1 serio: Serial port pts1 serio: Serial port pts3 serio: Serial port pts0 serio: Serial port pts2 serio: Serial port pts1 serio: Serial port pts0 x_tables: eb_tables: nfacct.0 match: invalid size 40 (kernel) != (user) 0 x_tables: eb_tables: nfacct.0 match: invalid size 40 (kernel) != (user) 0 x_tables: eb_tables: nfacct.0 match: invalid size 40 (kernel) != (user) 0