====================================================== WARNING: possible circular locking dependency detected 4.14.292-syzkaller #0 Not tainted ------------------------------------------------------ kworker/u4:3/2847 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:3/2847: #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: 2847 Comm: kworker/u4:3 Not tainted 4.14.292-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/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 FAT-fs (loop2): Invalid FSINFO signature: 0x00000000, 0x00000000 (sector = 1) FAT-fs (loop2): Invalid FSINFO signature: 0x00000000, 0x00000000 (sector = 1) FAT-fs (loop2): Invalid FSINFO signature: 0x00000000, 0x00000000 (sector = 1) FAT-fs (loop2): Invalid FSINFO signature: 0x00000000, 0x00000000 (sector = 1) FAT-fs (loop2): Invalid FSINFO signature: 0x00000000, 0x00000000 (sector = 1) FAT-fs (loop2): Invalid FSINFO signature: 0x00000000, 0x00000000 (sector = 1) FAT-fs (loop2): Invalid FSINFO signature: 0x00000000, 0x00000000 (sector = 1) FAT-fs (loop2): Invalid FSINFO signature: 0x00000000, 0x00000000 (sector = 1) FAT-fs (loop2): Invalid FSINFO signature: 0x00000000, 0x00000000 (sector = 1) FAT-fs (loop2): Invalid FSINFO signature: 0x00000000, 0x00000000 (sector = 1) unregister_netdevice: waiting for ip6gre0 to become free. Usage count = -1 FAULT_INJECTION: forcing a failure. name fail_page_alloc, interval 1, probability 0, space 0, times 1 CPU: 1 PID: 10356 Comm: syz-executor.1 Not tainted 4.14.292-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022 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_fail_alloc_page mm/page_alloc.c:2898 [inline] prepare_alloc_pages mm/page_alloc.c:4131 [inline] __alloc_pages_nodemask+0x22c/0x2720 mm/page_alloc.c:4179 alloc_pages_current+0x155/0x260 mm/mempolicy.c:2107 alloc_pages include/linux/gfp.h:520 [inline] pmd_alloc_one arch/x86/include/asm/pgalloc.h:102 [inline] __pmd_alloc+0x37/0x3f0 mm/memory.c:4350 pmd_alloc include/linux/mm.h:1714 [inline] __handle_mm_fault+0x1398/0x4620 mm/memory.c:4201 handle_mm_fault+0x455/0x9c0 mm/memory.c:4271 __do_page_fault+0x549/0xad0 arch/x86/mm/fault.c:1442 page_fault+0x25/0x50 arch/x86/entry/entry_64.S:1123 RIP: 0010:copy_user_enhanced_fast_string+0xe/0x20 arch/x86/lib/copy_user_64.S:181 RSP: 0018:ffff88805165fdc8 EFLAGS: 00050206 RAX: ffffed100a2cbfd4 RBX: 0000000000000068 RCX: 0000000000000068 RDX: 0000000000000068 RSI: ffff88805165fe38 RDI: 0000000020000380 RBP: ffff88805165fe38 R08: 0000000000000000 R09: ffffed100a2cbfd3 R10: ffff88805165fe9f R11: ffff888059978500 R12: 0000000020000380 R13: 00007ffffffff000 R14: 00000000200003e8 R15: ffff88809bed4380 copy_user_generic arch/x86/include/asm/uaccess_64.h:37 [inline] raw_copy_to_user arch/x86/include/asm/uaccess_64.h:112 [inline] _copy_to_user+0xaa/0xd0 lib/usercopy.c:28 SYSC_semctl ipc/sem.c:1591 [inline] SyS_semctl+0x164/0x220 ipc/sem.c:1568 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x7f97d14543c9 RSP: 002b:00007f97cfdc9168 EFLAGS: 00000246 ORIG_RAX: 0000000000000042 RAX: ffffffffffffffda RBX: 00007f97d1566f80 RCX: 00007f97d14543c9 RDX: 0000000000000002 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 00007f97cfdc91d0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000020000380 R11: 0000000000000246 R12: 0000000000000001 R13: 00007fffd244475f R14: 00007f97cfdc9300 R15: 0000000000022000 IPVS: set_ctl: invalid protocol: 58 172.20.20.187:20002 FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 1 CPU: 1 PID: 10429 Comm: syz-executor.1 Not tainted 4.14.292-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022 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+0x28e/0x3c0 mm/slab.c:3550 ptlock_alloc mm/memory.c:4866 [inline] ptlock_init include/linux/mm.h:1764 [inline] pgtable_pmd_page_ctor include/linux/mm.h:1856 [inline] pmd_alloc_one arch/x86/include/asm/pgalloc.h:105 [inline] __pmd_alloc+0xaf/0x3f0 mm/memory.c:4350 pmd_alloc include/linux/mm.h:1714 [inline] __handle_mm_fault+0x1398/0x4620 mm/memory.c:4201 handle_mm_fault+0x455/0x9c0 mm/memory.c:4271 __do_page_fault+0x549/0xad0 arch/x86/mm/fault.c:1442 page_fault+0x25/0x50 arch/x86/entry/entry_64.S:1123 RIP: 0010:copy_user_enhanced_fast_string+0xe/0x20 arch/x86/lib/copy_user_64.S:181 RSP: 0018:ffff888055687dc8 EFLAGS: 00050206 RAX: ffffed100aad0fd4 RBX: 0000000000000068 RCX: 0000000000000068 RDX: 0000000000000068 RSI: ffff888055687e38 RDI: 0000000020000380 RBP: ffff888055687e38 R08: 0000000000000000 R09: ffffed100aad0fd3 R10: ffff888055687e9f R11: ffff88805560e6c0 R12: 0000000020000380 R13: 00007ffffffff000 R14: 00000000200003e8 R15: ffff88809bed4380 copy_user_generic arch/x86/include/asm/uaccess_64.h:37 [inline] raw_copy_to_user arch/x86/include/asm/uaccess_64.h:112 [inline] _copy_to_user+0xaa/0xd0 lib/usercopy.c:28 SYSC_semctl ipc/sem.c:1591 [inline] SyS_semctl+0x164/0x220 ipc/sem.c:1568 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x7f97d14543c9 RSP: 002b:00007f97cfdc9168 EFLAGS: 00000246 ORIG_RAX: 0000000000000042 RAX: ffffffffffffffda RBX: 00007f97d1566f80 RCX: 00007f97d14543c9 RDX: 0000000000000002 RSI: 0000000000000000 RDI: 0000000000008001 RBP: 00007f97cfdc91d0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000020000380 R11: 0000000000000246 R12: 0000000000000001 R13: 00007fffd244475f R14: 00007f97cfdc9300 R15: 0000000000022000 FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 0 CPU: 0 PID: 10604 Comm: syz-executor.1 Not tainted 4.14.292-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022 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+0x28e/0x3c0 mm/slab.c:3550 anon_vma_chain_alloc mm/rmap.c:130 [inline] __anon_vma_prepare+0x5d/0x510 mm/rmap.c:184 anon_vma_prepare include/linux/rmap.h:157 [inline] do_huge_pmd_anonymous_page+0xd38/0x1700 mm/huge_memory.c:682 create_huge_pmd mm/memory.c:4002 [inline] __handle_mm_fault+0x2ac4/0x4620 mm/memory.c:4205 handle_mm_fault+0x455/0x9c0 mm/memory.c:4271 __do_page_fault+0x549/0xad0 arch/x86/mm/fault.c:1442 page_fault+0x25/0x50 arch/x86/entry/entry_64.S:1123 RIP: 0010:copy_user_enhanced_fast_string+0xe/0x20 arch/x86/lib/copy_user_64.S:181 RSP: 0018:ffff8880580f7dc8 EFLAGS: 00050206 RAX: ffffed100b01efd4 RBX: 0000000000000068 RCX: 0000000000000068 RDX: 0000000000000068 RSI: ffff8880580f7e38 RDI: 0000000020000380 RBP: ffff8880580f7e38 R08: 0000000000000000 R09: ffffed100b01efd3 R10: ffff8880580f7e9f R11: ffff888054d5c6c0 R12: 0000000020000380 R13: 00007ffffffff000 R14: 00000000200003e8 R15: ffff88809bed4380 copy_user_generic arch/x86/include/asm/uaccess_64.h:37 [inline] raw_copy_to_user arch/x86/include/asm/uaccess_64.h:112 [inline] _copy_to_user+0xaa/0xd0 lib/usercopy.c:28 SYSC_semctl ipc/sem.c:1591 [inline] SyS_semctl+0x164/0x220 ipc/sem.c:1568 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x7f97d14543c9 RSP: 002b:00007f97cfdc9168 EFLAGS: 00000246 ORIG_RAX: 0000000000000042 RAX: ffffffffffffffda RBX: 00007f97d1566f80 RCX: 00007f97d14543c9 RDX: 0000000000000002 RSI: 0000000000000000 RDI: 0000000000010002 RBP: 00007f97cfdc91d0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000020000380 R11: 0000000000000246 R12: 0000000000000001 R13: 00007fffd244475f R14: 00007f97cfdc9300 R15: 0000000000022000 FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 0 CPU: 1 PID: 10668 Comm: syz-executor.1 Not tainted 4.14.292-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022 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+0x28e/0x3c0 mm/slab.c:3550 anon_vma_alloc mm/rmap.c:82 [inline] __anon_vma_prepare+0x2ae/0x510 mm/rmap.c:191 anon_vma_prepare include/linux/rmap.h:157 [inline] do_huge_pmd_anonymous_page+0xd38/0x1700 mm/huge_memory.c:682 create_huge_pmd mm/memory.c:4002 [inline] __handle_mm_fault+0x2ac4/0x4620 mm/memory.c:4205 handle_mm_fault+0x455/0x9c0 mm/memory.c:4271 __do_page_fault+0x549/0xad0 arch/x86/mm/fault.c:1442 page_fault+0x25/0x50 arch/x86/entry/entry_64.S:1123 RIP: 0010:copy_user_enhanced_fast_string+0xe/0x20 arch/x86/lib/copy_user_64.S:181 RSP: 0018:ffff8880581ffdc8 EFLAGS: 00050206 RAX: ffffed100b03ffd4 RBX: 0000000000000068 RCX: 0000000000000068 RDX: 0000000000000068 RSI: ffff8880581ffe38 RDI: 0000000020000380 RBP: ffff8880581ffe38 R08: 0000000000000000 R09: ffffed100b03ffd3 R10: ffff8880581ffe9f R11: ffff8880a61e8300 R12: 0000000020000380 R13: 00007ffffffff000 R14: 00000000200003e8 R15: ffff88809bed4380 copy_user_generic arch/x86/include/asm/uaccess_64.h:37 [inline] raw_copy_to_user arch/x86/include/asm/uaccess_64.h:112 [inline] _copy_to_user+0xaa/0xd0 lib/usercopy.c:28 SYSC_semctl ipc/sem.c:1591 [inline] SyS_semctl+0x164/0x220 ipc/sem.c:1568 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x7f97d14543c9 RSP: 002b:00007f97cfdc9168 EFLAGS: 00000246 ORIG_RAX: 0000000000000042 RAX: ffffffffffffffda RBX: 00007f97d1566f80 RCX: 00007f97d14543c9 RDX: 0000000000000002 RSI: 0000000000000000 RDI: 0000000000018003 RBP: 00007f97cfdc91d0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000020000380 R11: 0000000000000246 R12: 0000000000000001 R13: 00007fffd244475f R14: 00007f97cfdc9300 R15: 0000000000022000 FAULT_INJECTION: forcing a failure. name fail_page_alloc, interval 1, probability 0, space 0, times 0 CPU: 1 PID: 10833 Comm: syz-executor.1 Not tainted 4.14.292-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022 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_fail_alloc_page mm/page_alloc.c:2898 [inline] prepare_alloc_pages mm/page_alloc.c:4131 [inline] __alloc_pages_nodemask+0x22c/0x2720 mm/page_alloc.c:4179 __alloc_pages include/linux/gfp.h:484 [inline] __alloc_pages_node include/linux/gfp.h:497 [inline] alloc_pages_vma+0x4b3/0x6d0 mm/mempolicy.c:2064 do_huge_pmd_anonymous_page+0x2d6/0x1700 mm/huge_memory.c:725 create_huge_pmd mm/memory.c:4002 [inline] __handle_mm_fault+0x2ac4/0x4620 mm/memory.c:4205 handle_mm_fault+0x455/0x9c0 mm/memory.c:4271 __do_page_fault+0x549/0xad0 arch/x86/mm/fault.c:1442 page_fault+0x25/0x50 arch/x86/entry/entry_64.S:1123 RIP: 0010:copy_user_enhanced_fast_string+0xe/0x20 arch/x86/lib/copy_user_64.S:181 RSP: 0018:ffff88809122fdc8 EFLAGS: 00050206 RAX: ffffed1012245fd4 RBX: 0000000000000068 RCX: 0000000000000068 RDX: 0000000000000068 RSI: ffff88809122fe38 RDI: 0000000020000380 RBP: ffff88809122fe38 R08: 0000000000000000 R09: ffffed1012245fd3 R10: ffff88809122fe9f R11: ffff88808f96c580 R12: 0000000020000380 R13: 00007ffffffff000 R14: 00000000200003e8 R15: ffff88809bed4380 copy_user_generic arch/x86/include/asm/uaccess_64.h:37 [inline] raw_copy_to_user arch/x86/include/asm/uaccess_64.h:112 [inline] _copy_to_user+0xaa/0xd0 lib/usercopy.c:28 SYSC_semctl ipc/sem.c:1591 [inline] SyS_semctl+0x164/0x220 ipc/sem.c:1568 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x7f97d14543c9 RSP: 002b:00007f97cfdc9168 EFLAGS: 00000246 ORIG_RAX: 0000000000000042