====================================================== [ INFO: possible circular locking dependency detected ] 4.9.111-g03c70fe #6 Not tainted ------------------------------------------------------- syz-executor7/9686 is trying to acquire lock: (rtnl_mutex){+.+.+.}, at: [] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:70 but task is already holding lock: (sk_lock-AF_INET){+.+.+.}, at: [] lock_sock include/net/sock.h:1404 [inline] (sk_lock-AF_INET){+.+.+.}, at: [] do_ip_setsockopt.isra.13+0x269/0x2b10 net/ipv4/ip_sockglue.c:636 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: lock_acquire+0x130/0x3e0 kernel/locking/lockdep.c:3756 lock_sock_nested+0xc6/0x120 net/core/sock.c:2511 lock_sock include/net/sock.h:1404 [inline] do_ip_setsockopt.isra.13+0x12a/0x2b10 net/ipv4/ip_sockglue.c:636 ip_setsockopt+0x3a/0xb0 net/ipv4/ip_sockglue.c:1240 udp_setsockopt+0x4a/0x90 net/ipv4/udp.c:2091 sock_common_setsockopt+0x9a/0xe0 net/core/sock.c:2706 SYSC_setsockopt net/socket.c:1772 [inline] SyS_setsockopt+0x166/0x260 net/socket.c:1751 do_syscall_64+0x1a6/0x490 arch/x86/entry/common.c:282 entry_SYSCALL_64_after_swapgs+0x5d/0xdb check_prev_add kernel/locking/lockdep.c:1828 [inline] check_prevs_add kernel/locking/lockdep.c:1938 [inline] validate_chain kernel/locking/lockdep.c:2265 [inline] __lock_acquire+0x3019/0x4070 kernel/locking/lockdep.c:3345 lock_acquire+0x130/0x3e0 kernel/locking/lockdep.c:3756 __mutex_lock_common kernel/locking/mutex.c:521 [inline] mutex_lock_nested+0xc0/0x870 kernel/locking/mutex.c:621 rtnl_lock+0x17/0x20 net/core/rtnetlink.c:70 mrtsock_destruct+0x3b/0x1e0 net/ipv4/ipmr.c:1231 ip_ra_control+0x2c2/0x420 net/ipv4/ip_sockglue.c:360 do_ip_setsockopt.isra.13+0x15ff/0x2b10 net/ipv4/ip_sockglue.c:1137 ip_setsockopt+0x3a/0xb0 net/ipv4/ip_sockglue.c:1240 raw_setsockopt+0xb7/0xd0 net/ipv4/raw.c:833 sock_common_setsockopt+0x9a/0xe0 net/core/sock.c:2706 SYSC_setsockopt net/socket.c:1772 [inline] SyS_setsockopt+0x166/0x260 net/socket.c:1751 do_syscall_64+0x1a6/0x490 arch/x86/entry/common.c:282 entry_SYSCALL_64_after_swapgs+0x5d/0xdb other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(sk_lock-AF_INET); lock(rtnl_mutex); lock(sk_lock-AF_INET); lock(rtnl_mutex); *** DEADLOCK *** 1 lock held by syz-executor7/9686: #0: (sk_lock-AF_INET){+.+.+.}, at: [] lock_sock include/net/sock.h:1404 [inline] #0: (sk_lock-AF_INET){+.+.+.}, at: [] do_ip_setsockopt.isra.13+0x269/0x2b10 net/ipv4/ip_sockglue.c:636 stack backtrace: CPU: 0 PID: 9686 Comm: syz-executor7 Not tainted 4.9.111-g03c70fe #6 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 ffff88019fcaf5f8 ffffffff81eb2729 ffffffff8559d0a0 ffffffff855e7650 ffffffff8559d0a0 ffff8801a035d0e8 ffff8801a035c800 ffff88019fcaf640 ffffffff814263a4 0000000000000001 00000000a035c800 0000000000000001 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x128 lib/dump_stack.c:51 [] print_circular_bug.cold.51+0x1bd/0x27d kernel/locking/lockdep.c:1202 [] check_prev_add kernel/locking/lockdep.c:1828 [inline] [] check_prevs_add kernel/locking/lockdep.c:1938 [inline] [] validate_chain kernel/locking/lockdep.c:2265 [inline] [] __lock_acquire+0x3019/0x4070 kernel/locking/lockdep.c:3345 [] lock_acquire+0x130/0x3e0 kernel/locking/lockdep.c:3756 [] __mutex_lock_common kernel/locking/mutex.c:521 [inline] [] mutex_lock_nested+0xc0/0x870 kernel/locking/mutex.c:621 [] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:70 [] mrtsock_destruct+0x3b/0x1e0 net/ipv4/ipmr.c:1231 [] ip_ra_control+0x2c2/0x420 net/ipv4/ip_sockglue.c:360 [] do_ip_setsockopt.isra.13+0x15ff/0x2b10 net/ipv4/ip_sockglue.c:1137 [] ip_setsockopt+0x3a/0xb0 net/ipv4/ip_sockglue.c:1240 [] raw_setsockopt+0xb7/0xd0 net/ipv4/raw.c:833 [] sock_common_setsockopt+0x9a/0xe0 net/core/sock.c:2706 [] SYSC_setsockopt net/socket.c:1772 [inline] [] SyS_setsockopt+0x166/0x260 net/socket.c:1751 [] do_syscall_64+0x1a6/0x490 arch/x86/entry/common.c:282 [] entry_SYSCALL_64_after_swapgs+0x5d/0xdb attempt to access beyond end of device loop2: rw=536870912, want=34933, limit=112 attempt to access beyond end of device loop2: rw=536870912, want=36981, limit=112 attempt to access beyond end of device loop2: rw=536870912, want=39029, limit=112 attempt to access beyond end of device loop2: rw=536870912, want=41077, limit=112 attempt to access beyond end of device loop2: rw=536870912, want=43125, limit=112 attempt to access beyond end of device loop2: rw=536870912, want=45173, limit=112 attempt to access beyond end of device loop2: rw=536870912, want=47221, limit=112 attempt to access beyond end of device loop2: rw=536870912, want=49269, limit=112 attempt to access beyond end of device loop2: rw=536870912, want=51317, limit=112 attempt to access beyond end of device loop2: rw=536870912, want=53365, limit=112 attempt to access beyond end of device loop2: rw=536870912, want=55413, limit=112 attempt to access beyond end of device loop2: rw=536870912, want=57461, limit=112 attempt to access beyond end of device loop2: rw=536870912, want=59509, limit=112 attempt to access beyond end of device loop2: rw=536870912, want=61557, limit=112 attempt to access beyond end of device loop2: rw=536870912, want=63341, limit=112 attempt to access beyond end of device loop2: rw=536870912, want=114, limit=112 buffer_io_error: 148 callbacks suppressed Buffer I/O error on dev loop2, logical block 113, lost async page write attempt to access beyond end of device loop2: rw=536870912, want=115, limit=112 Buffer I/O error on dev loop2, logical block 114, lost async page write attempt to access beyond end of device loop2: rw=536870912, want=116, limit=112 Buffer I/O error on dev loop2, logical block 115, lost async page write attempt to access beyond end of device loop2: rw=536870912, want=117, limit=112 Buffer I/O error on dev loop2, logical block 116, lost async page write attempt to access beyond end of device loop2: rw=536870912, want=130, limit=112 Buffer I/O error on dev loop2, logical block 129, lost async page write attempt to access beyond end of device loop2: rw=536870912, want=131, limit=112 Buffer I/O error on dev loop2, logical block 130, lost async page write attempt to access beyond end of device loop2: rw=536870912, want=132, limit=112 Buffer I/O error on dev loop2, logical block 131, lost async page write attempt to access beyond end of device loop2: rw=536870912, want=133, limit=112 Buffer I/O error on dev loop2, logical block 132, lost async page write attempt to access beyond end of device loop2: rw=536870912, want=2189, limit=112 attempt to access beyond end of device loop2: rw=536870912, want=4237, limit=112 attempt to access beyond end of device loop2: rw=536870912, want=6285, limit=112 attempt to access beyond end of device loop2: rw=536870912, want=8333, limit=112 attempt to access beyond end of device loop2: rw=536870912, want=10381, limit=112 attempt to access beyond end of device loop2: rw=536870912, want=10965, limit=112 IPVS: stopping master sync thread 8436 ... attempt to access beyond end of device loop0: rw=536870912, want=130, limit=112 Buffer I/O error on dev loop0, logical block 129, lost async page write attempt to access beyond end of device loop0: rw=536870912, want=131, limit=112 Buffer I/O error on dev loop0, logical block 130, lost async page write attempt to access beyond end of device loop0: rw=536870912, want=132, limit=112 attempt to access beyond end of device loop0: rw=536870912, want=133, limit=112 attempt to access beyond end of device loop0: rw=536870912, want=142, limit=112 attempt to access beyond end of device loop0: rw=536870912, want=143, limit=112 attempt to access beyond end of device loop0: rw=536870912, want=144, limit=112 attempt to access beyond end of device loop0: rw=536870912, want=145, limit=112 attempt to access beyond end of device loop0: rw=536870912, want=2193, limit=112 attempt to access beyond end of device loop0: rw=536870912, want=4241, limit=112 attempt to access beyond end of device loop0: rw=536870912, want=6289, limit=112 attempt to access beyond end of device loop0: rw=536870912, want=8337, limit=112 attempt to access beyond end of device loop0: rw=536870912, want=10385, limit=112 attempt to access beyond end of device loop0: rw=536870912, want=12433, limit=112 attempt to access beyond end of device loop0: rw=536870912, want=14481, limit=112 attempt to access beyond end of device loop0: rw=536870912, want=16529, limit=112 attempt to access beyond end of device loop0: rw=536870912, want=18577, limit=112 attempt to access beyond end of device loop0: rw=536870912, want=20625, limit=112 attempt to access beyond end of device loop0: rw=536870912, want=22673, limit=112 attempt to access beyond end of device loop0: rw=536870912, want=24721, limit=112 attempt to access beyond end of device loop0: rw=536870912, want=26769, limit=112 attempt to access beyond end of device loop0: rw=536870912, want=28817, limit=112 attempt to access beyond end of device loop0: rw=536870912, want=30865, limit=112 attempt to access beyond end of device loop0: rw=536870912, want=32889, limit=112 IPVS: Creating netns size=2536 id=21 IPv6: ADDRCONF(NETDEV_UP): veth0_to_bridge: link is not ready IPv6: ADDRCONF(NETDEV_UP): veth1_to_bridge: link is not ready IPv6: ADDRCONF(NETDEV_UP): veth0_to_bond: link is not ready IPv6: ADDRCONF(NETDEV_UP): veth1_to_bond: link is not ready IPv6: ADDRCONF(NETDEV_UP): veth0_to_team: link is not ready IPv6: ADDRCONF(NETDEV_UP): veth1_to_team: link is not ready IPv6: ADDRCONF(NETDEV_CHANGE): veth0_to_bridge: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): veth1_to_bridge: link becomes ready IPv6: ADDRCONF(NETDEV_UP): veth0: link is not ready IPv6: ADDRCONF(NETDEV_UP): veth1: link is not ready IPv6: ADDRCONF(NETDEV_CHANGE): veth1: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): veth0: link becomes ready