====================================================== WARNING: possible circular locking dependency detected 4.17.0-rc6+ #25 Not tainted ------------------------------------------------------ syz-executor2/9566 is trying to acquire lock: (ptrval) (&htab->buckets[i].lock){+...}, at: bpf_tcp_close+0x822/0x10b0 kernel/bpf/sockmap.c:285 but task is already holding lock: (ptrval) (clock-AF_INET6){++..}, at: bpf_tcp_close+0x241/0x10b0 kernel/bpf/sockmap.c:260 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (clock-AF_INET6){++..}: __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_delete_elem+0x7c6/0xaf0 kernel/bpf/sockmap.c:2338 map_delete_elem+0x32e/0x4e0 kernel/bpf/syscall.c:815 __do_sys_bpf kernel/bpf/syscall.c:2349 [inline] __se_sys_bpf kernel/bpf/syscall.c:2317 [inline] __x64_sys_bpf+0x342/0x510 kernel/bpf/syscall.c:2317 do_syscall_64+0x1b1/0x800 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x49/0xbe -> #0 (&htab->buckets[i].lock){+...}: lock_acquire+0x1dc/0x520 kernel/locking/lockdep.c:3920 __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 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(clock-AF_INET6); lock(&htab->buckets[i].lock); lock(clock-AF_INET6); lock(&htab->buckets[i].lock); *** DEADLOCK *** 2 locks held by syz-executor2/9566: #0: (ptrval) (rcu_read_lock){....}, at: bpf_tcp_close+0x0/0x10b0 kernel/bpf/sockmap.c:2106 #1: (ptrval) (clock-AF_INET6){++..}, at: bpf_tcp_close+0x241/0x10b0 kernel/bpf/sockmap.c:260 stack backtrace: CPU: 0 PID: 9566 Comm: syz-executor2 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 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_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 RIP: 0033:0x455a09 RSP: 002b:00007f1101d63ce8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: fffffffffffffe00 RBX: 000000000072c028 RCX: 0000000000455a09 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 000000000072c028 RBP: 000000000072c028 R08: 0000000000000000 R09: 000000000072c000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffdf4b5a1ef R14: 00007f1101d649c0 R15: 0000000000000002 rpcbind: RPC call returned error 22 rpcbind: RPC call returned error 22 do_dccp_setsockopt: sockopt(CHANGE_L/R) is deprecated: fix your app do_dccp_setsockopt: sockopt(CHANGE_L/R) is deprecated: fix your app ********************************************************** ** NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE ** ** ** ** trace_printk() being used. Allocating extra memory. ** ** ** ** This means that this is a DEBUG kernel and it is ** ** unsafe for production use. ** ** ** ** If you see this message and you are not debugging ** ** the kernel, report this immediately to your vendor! ** ** ** ** NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE ** ********************************************************** tmpfs: No value for mount option 'º„$¬Ã©…—E3?1i¢púÈýGR‚]?qx˜A뫞r‰ì�’§¤nŠdRQ Td³KñÖNØÁ#5ãªöÓ0dà!Y)4zôÃWá2ÔPªj—ŠvúœvYÃ]![áj‚Î&§éú]Þ–²E$6‹sm+EB;ÿ$ ¨õªjŸuIAgIÉ{õü/À9•bÏ"Ä �½³“yœ )މmš­’H0@ŸF2’–6�y$³y¾Q£GwÖÍ€d2db?ïF‘‹ÊÇÿ>ÇÇŠ<‚ ¯”mm"�† š2¶$³ÂuÏLÓàCáN9ÂcµEj û³ÒÆáN;y�‚~ë/o¨à<’U¯™'ÙëƒÊ.î·„qêÚ˜RÜBº ù ™<×�4„º« wXu¢ueÄY' .¬f' tmpfs: No value for mount option 'º„$¬Ã©…—E3?1i¢púÈýGR‚]?qx˜A뫞r‰ì�’§¤nŠdRQ Td³KñÖNØÁ#5ãªöÓ0dà!Y)4zôÃWá2ÔPªj—ŠvúœvYÃ]![áj‚Î&§éú]Þ–²E$6‹sm+EB;ÿ$ ¨õªjŸuIAgIÉ{õü/À9•bÏ"Ä �½³“yœ )މmš­’H0@ŸF2’–6�y$³y¾Q£GwÖÍ€d2db?ïF‘‹ÊÇÿ>ÇÇŠ<‚ ¯”mm"�† š2¶$³ÂuÏLÓàCáN9ÂcµEj û³ÒÆáN;y�‚~ë/o¨à<’U¯™'ÙëƒÊ.î·„qêÚ˜RÜBº ù ™<×�4„º« wXu¢ueÄY' .¬f' NFS: bad mount option value specified: v­ NFS: bad mount option value specified: v­ FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 1 CPU: 0 PID: 10623 Comm: syz-executor2 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+0x2c8/0x760 mm/slab.c:3727 kmalloc include/linux/slab.h:517 [inline] sock_kmalloc+0x14e/0x1d0 net/core/sock.c:1996 ipv6_sock_mc_join+0x591/0xbf0 net/ipv6/mcast.c:158 do_ipv6_setsockopt.isra.9+0x3e3d/0x4680 net/ipv6/ipv6_sockglue.c:644 ipv6_setsockopt+0xbd/0x170 net/ipv6/ipv6_sockglue.c:922 udpv6_setsockopt+0x62/0xa0 net/ipv6/udp.c:1474 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:00007f1101da5c68 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 00007f1101da66d4 RCX: 0000000000455a09 RDX: 0000000000000014 RSI: 0000000000000029 RDI: 0000000000000014 RBP: 000000000072bea0 R08: 0000000000000301 R09: 0000000000000000 R10: 0000000020000080 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: 10650 Comm: syz-executor2 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+0x4b/0x780 mm/slab.c:3618 kmalloc include/linux/slab.h:512 [inline] kzalloc include/linux/slab.h:701 [inline] mca_alloc net/ipv6/mcast.c:838 [inline] ipv6_dev_mc_inc+0x45c/0xc40 net/ipv6/mcast.c:897 ipv6_sock_mc_join+0x75b/0xbf0 net/ipv6/mcast.c:190 do_ipv6_setsockopt.isra.9+0x3e3d/0x4680 net/ipv6/ipv6_sockglue.c:644