====================================================== WARNING: possible circular locking dependency detected 4.17.0-rc6+ #25 Not tainted ------------------------------------------------------ kworker/1:1/25 is trying to acquire lock: (ptrval) (clock-AF_INET6){++..}, at: sock_hash_free+0x377/0x700 kernel/bpf/sockmap.c:2089 but task is already holding lock: (ptrval) (&htab->buckets[i].lock#2){+...}, at: sock_hash_free+0x1d4/0x700 kernel/bpf/sockmap.c:2083 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&htab->buckets[i].lock#2){+...}: __raw_spin_lock_bh include/linux/spinlock_api_smp.h:135 [inline] _raw_spin_lock_bh+0x31/0x40 kernel/locking/spinlock.c:168 bpf_tcp_close+0x822/0x10b0 kernel/bpf/sockmap.c:285 inet_release+0x104/0x1f0 net/ipv4/af_inet.c:427 inet6_release+0x50/0x70 net/ipv6/af_inet6.c:459 sock_release+0x96/0x1b0 net/socket.c:594 sock_close+0x16/0x20 net/socket.c:1149 __fput+0x34d/0x890 fs/file_table.c:209 ____fput+0x15/0x20 fs/file_table.c:243 task_work_run+0x1e4/0x290 kernel/task_work.c:113 exit_task_work include/linux/task_work.h:22 [inline] do_exit+0x1aee/0x2730 kernel/exit.c:865 do_group_exit+0x16f/0x430 kernel/exit.c:968 get_signal+0x886/0x1960 kernel/signal.c:2482 do_signal+0x98/0x2040 arch/x86/kernel/signal.c:810 exit_to_usermode_loop+0x28a/0x310 arch/x86/entry/common.c:162 prepare_exit_to_usermode arch/x86/entry/common.c:196 [inline] syscall_return_slowpath arch/x86/entry/common.c:265 [inline] do_syscall_64+0x6ac/0x800 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe -> #0 (clock-AF_INET6){++..}: lock_acquire+0x1dc/0x520 kernel/locking/lockdep.c:3920 __raw_write_lock_bh include/linux/rwlock_api_smp.h:203 [inline] _raw_write_lock_bh+0x31/0x40 kernel/locking/spinlock.c:312 sock_hash_free+0x377/0x700 kernel/bpf/sockmap.c:2089 bpf_map_free_deferred+0xba/0xf0 kernel/bpf/syscall.c:261 process_one_work+0xc1e/0x1b50 kernel/workqueue.c:2145 worker_thread+0x1cc/0x1440 kernel/workqueue.c:2279 kthread+0x345/0x410 kernel/kthread.c:240 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:412 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&htab->buckets[i].lock#2); lock(clock-AF_INET6); lock(&htab->buckets[i].lock#2); lock(clock-AF_INET6); *** DEADLOCK *** 4 locks held by kworker/1:1/25: #0: (ptrval) ((wq_completion)"events"){+.+.}, at: __write_once_size include/linux/compiler.h:215 [inline] #0: (ptrval) ((wq_completion)"events"){+.+.}, at: arch_atomic64_set arch/x86/include/asm/atomic64_64.h:34 [inline] #0: (ptrval) ((wq_completion)"events"){+.+.}, at: atomic64_set include/asm-generic/atomic-instrumented.h:40 [inline] #0: (ptrval) ((wq_completion)"events"){+.+.}, at: atomic_long_set include/asm-generic/atomic-long.h:57 [inline] #0: (ptrval) ((wq_completion)"events"){+.+.}, at: set_work_data kernel/workqueue.c:617 [inline] #0: (ptrval) ((wq_completion)"events"){+.+.}, at: set_work_pool_and_clear_pending kernel/workqueue.c:644 [inline] #0: (ptrval) ((wq_completion)"events"){+.+.}, at: process_one_work+0xaef/0x1b50 kernel/workqueue.c:2116 #1: (ptrval) ((work_completion)(&map->work)){+.+.}, at: process_one_work+0xb46/0x1b50 kernel/workqueue.c:2120 #2: (ptrval) (rcu_read_lock){....}, at: sock_hash_free+0x0/0x700 include/net/sock.h:2178 #3: (ptrval) (&htab->buckets[i].lock#2){+...}, at: sock_hash_free+0x1d4/0x700 kernel/bpf/sockmap.c:2083 stack backtrace: CPU: 1 PID: 25 Comm: kworker/1:1 Not tainted 4.17.0-rc6+ #25 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: events bpf_map_free_deferred Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1b9/0x294 lib/dump_stack.c:113 print_circular_bug.isra.36.cold.54+0x1bd/0x27d kernel/locking/lockdep.c:1223 check_prev_add kernel/locking/lockdep.c:1863 [inline] check_prevs_add kernel/locking/lockdep.c:1976 [inline] validate_chain kernel/locking/lockdep.c:2417 [inline] __lock_acquire+0x343e/0x5140 kernel/locking/lockdep.c:3431 lock_acquire+0x1dc/0x520 kernel/locking/lockdep.c:3920 __raw_write_lock_bh include/linux/rwlock_api_smp.h:203 [inline] _raw_write_lock_bh+0x31/0x40 kernel/locking/spinlock.c:312 sock_hash_free+0x377/0x700 kernel/bpf/sockmap.c:2089 bpf_map_free_deferred+0xba/0xf0 kernel/bpf/syscall.c:261 process_one_work+0xc1e/0x1b50 kernel/workqueue.c:2145 worker_thread+0x1cc/0x1440 kernel/workqueue.c:2279 kthread+0x345/0x410 kernel/kthread.c:240 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:412 EXT4-fs (sda1): Unrecognized mount option "pHb*Aq̖ժ*c%dpae r" or missing value EXT4-fs (sda1): Unrecognized mount option "pHb*Aq̖ժ*c%dpae r" or missing value syz-executor0 (7544) used greatest stack depth: 15464 bytes left can: request_module (can-proto-0) failed. can: request_module (can-proto-0) failed. overlayfs: unrecognized mount option "uaS" or missing value 9pnet_virtio: no channels available for device ./file0 hugetlbfs: Bad mount option: "w V9 X;" 9pnet_virtio: no channels available for device ./file0 overlayfs: unrecognized mount option "(YpU\" or missing value raw_sendmsg: syz-executor2 forgot to set AF_INET. Fix it! overlayfs: unrecognized mount option "(YpU\" or missing value FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 1 CPU: 1 PID: 8196 Comm: syz-executor3 Not tainted 4.17.0-rc6+ #25 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1b9/0x294 lib/dump_stack.c:113 fail_dump lib/fault-inject.c:51 [inline] should_fail.cold.4+0xa/0x1a lib/fault-inject.c:149 __should_failslab+0x124/0x180 mm/failslab.c:32 should_failslab+0x9/0x14 mm/slab_common.c:1522 slab_pre_alloc_hook mm/slab.h:423 [inline] slab_alloc mm/slab.c:3378 [inline] kmem_cache_alloc_trace+0x2cb/0x780 mm/slab.c:3618 kmalloc include/linux/slab.h:512 [inline] call_modprobe kernel/kmod.c:80 [inline] __request_module+0x386/0xcdd kernel/kmod.c:171 tcp_ca_find_autoload.isra.2+0x100/0x1b0 net/ipv4/tcp_cong.c:44 tcp_set_congestion_control+0xf0/0x500 net/ipv4/tcp_cong.c:348 do_tcp_setsockopt.isra.41+0x3a2/0x2680 net/ipv4/tcp.c:2731 tcp_setsockopt+0xc1/0xe0 net/ipv4/tcp.c:3060 sock_common_setsockopt+0x9a/0xe0 net/core/sock.c:3046 __sys_setsockopt+0x1bd/0x390 net/socket.c:1903 __do_sys_setsockopt net/socket.c:1914 [inline] __se_sys_setsockopt net/socket.c:1911 [inline] __x64_sys_setsockopt+0xbe/0x150 net/socket.c:1911 do_syscall_64+0x1b1/0x800 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x455a09 RSP: 002b:00007fce740abc68 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 00007fce740ac6d4 RCX: 0000000000455a09 RDX: 000000000000000d RSI: 0000000000000006 RDI: 0000000000000014 RBP: 000000000072bea0 R08: 0000000000000010 R09: 0000000000000000 R10: 0000000020000180 R11: 0000000000000246 R12: 0000000000000015 R13: 00000000000006ae R14: 00000000006fe0f0 R15: 0000000000000000 FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 0 CPU: 0 PID: 8241 Comm: syz-executor3 Not tainted 4.17.0-rc6+ #25 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1b9/0x294 lib/dump_stack.c:113 fail_dump lib/fault-inject.c:51 [inline] should_fail.cold.4+0xa/0x1a lib/fault-inject.c:149 __should_failslab+0x124/0x180 mm/failslab.c:32 should_failslab+0x9/0x14 mm/slab_common.c:1522 slab_pre_alloc_hook mm/slab.h:423 [inline] slab_alloc mm/slab.c:3378 [inline] __do_kmalloc mm/slab.c:3716 [inline] __kmalloc_track_caller+0x2c4/0x760 mm/slab.c:3733 kstrdup+0x39/0x70 mm/util.c:56 call_modprobe kernel/kmod.c:84 [inline] __request_module+0x3a8/0xcdd kernel/kmod.c:171 tcp_ca_find_autoload.isra.2+0x100/0x1b0 net/ipv4/tcp_cong.c:44 tcp_set_congestion_control+0xf0/0x500 net/ipv4/tcp_cong.c:348 do_tcp_setsockopt.isra.41+0x3a2/0x2680 net/ipv4/tcp.c:2731 tcp_setsockopt+0xc1/0xe0 net/ipv4/tcp.c:3060 sock_common_setsockopt+0x9a/0xe0 net/core/sock.c:3046 __sys_setsockopt+0x1bd/0x390 net/socket.c:1903 __do_sys_setsockopt net/socket.c:1914 [inline] __se_sys_setsockopt net/socket.c:1911 [inline] __x64_sys_setsockopt+0xbe/0x150 net/socket.c:1911 do_syscall_64+0x1b1/0x800 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x455a09 RSP: 002b:00007fce740abc68 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 00007fce740ac6d4 RCX: 0000000000455a09 RDX: 000000000000000d RSI: 0000000000000006 RDI: 0000000000000014 RBP: 000000000072bea0 R08: 0000000000000010 R09: 0000000000000000 R10: 0000000020000180 R11: 0000000000000246 R12: 0000000000000015 R13: 00000000000006ae R14: 00000000006fe0f0 R15: 0000000000000001 FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 0 CPU: 0 PID: 8296 Comm: syz-executor3 Not tainted 4.17.0-rc6+ #25 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1b9/0x294 lib/dump_stack.c:113 fail_dump lib/fault-inject.c:51 [inline] should_fail.cold.4+0xa/0x1a lib/fault-inject.c:149 __should_failslab+0x124/0x180 mm/failslab.c:32 should_failslab+0x9/0x14 mm/slab_common.c:1522 slab_pre_alloc_hook mm/slab.h:423 [inline] slab_alloc mm/slab.c:3378 [inline] kmem_cache_alloc_trace+0x2cb/0x780 mm/slab.c:3618 kmalloc include/linux/slab.h:512 [inline] kzalloc include/linux/slab.h:701 [inline] call_usermodehelper_setup+0xe8/0x400 kernel/umh.c:382 call_modprobe kernel/kmod.c:94 [inline] __request_module+0x49a/0xcdd kernel/kmod.c:171 tcp_ca_find_autoload.isra.2+0x100/0x1b0 net/ipv4/tcp_cong.c:44 tcp_set_congestion_control+0xf0/0x500 net/ipv4/tcp_cong.c:348 do_tcp_setsockopt.isra.41+0x3a2/0x2680 net/ipv4/tcp.c:2731 tcp_setsockopt+0xc1/0xe0 net/ipv4/tcp.c:3060 sock_common_setsockopt+0x9a/0xe0 net/core/sock.c:3046 __sys_setsockopt+0x1bd/0x390 net/socket.c:1903 __do_sys_setsockopt net/socket.c:1914 [inline] __se_sys_setsockopt net/socket.c:1911 [inline] __x64_sys_setsockopt+0xbe/0x150 net/socket.c:1911 do_syscall_64+0x1b1/0x800 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x455a09 RSP: 002b:00007fce740abc68 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 00007fce740ac6d4 RCX: 0000000000455a09 RDX: 000000000000000d RSI: 0000000000000006 RDI: 0000000000000014 RBP: 000000000072bea0 R08: 0000000000000010 R09: 0000000000000000 R10: 0000000020000180 R11: 0000000000000246 R12: 0000000000000015 R13: 00000000000006ae R14: 00000000006fe0f0 R15: 0000000000000002