[ INFO: possible circular locking dependency detected ]
4.9.110-g00a0bcb #4 Not tainted
-------------------------------------------------------
syz-executor2/11250 is trying to acquire lock:
 (sk_lock-AF_INET){+.+.+.}, at: [<ffffffff832f48fb>] lock_sock include/net/sock.h:1404 [inline]
 (sk_lock-AF_INET){+.+.+.}, at: [<ffffffff832f48fb>] set_mcast_if net/netfilter/ipvs/ip_vs_sync.c:1370 [inline]
 (sk_lock-AF_INET){+.+.+.}, at: [<ffffffff832f48fb>] make_send_sock net/netfilter/ipvs/ip_vs_sync.c:1490 [inline]
 (sk_lock-AF_INET){+.+.+.}, at: [<ffffffff832f48fb>] start_sync_thread+0x88b/0x1e80 net/netfilter/ipvs/ip_vs_sync.c:1885
but task is already holding lock:
 (rtnl_mutex){+.+.+.}, at: [<ffffffff830b3937>] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:70
which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #1 (rtnl_mutex){+.+.+.}:
       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

-> #0 (sk_lock-AF_INET){+.+.+.}:
       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
       lock_sock_nested+0xc6/0x120 net/core/sock.c:2511
       lock_sock include/net/sock.h:1404 [inline]
       set_mcast_if net/netfilter/ipvs/ip_vs_sync.c:1370 [inline]
       make_send_sock net/netfilter/ipvs/ip_vs_sync.c:1490 [inline]
       start_sync_thread+0x88b/0x1e80 net/netfilter/ipvs/ip_vs_sync.c:1885
       do_ip_vs_set_ctl+0x7c8/0xc00 net/netfilter/ipvs/ip_vs_ctl.c:2398
       nf_sockopt net/netfilter/nf_sockopt.c:105 [inline]
       nf_setsockopt+0x6d/0xc0 net/netfilter/nf_sockopt.c:114
       ip_setsockopt+0x9a/0xb0 net/ipv4/ip_sockglue.c:1247
       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

other info that might help us debug this:

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(rtnl_mutex);
                               lock(sk_lock-AF_INET);
                               lock(rtnl_mutex);
  lock(sk_lock-AF_INET);

 *** DEADLOCK ***

2 locks held by syz-executor2/11250:
 #0:  (rtnl_mutex){+.+.+.}, at: [<ffffffff830b3937>] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:70
 #1:  (ipvs->sync_mutex){+.+.+.}, at: [<ffffffff832f4188>] start_sync_thread+0x118/0x1e80 net/netfilter/ipvs/ip_vs_sync.c:1779

stack backtrace:
CPU: 0 PID: 11250 Comm: syz-executor2 Not tainted 4.9.110-g00a0bcb #4
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
 ffff8801d41975a8 ffffffff81eb2329 ffffffff855e7b60 ffffffff8559d0a0
 ffffffff855e7b60 ffff8801c777b8e8 ffff8801c777b000 ffff8801d41975f0
 ffffffff814262d4 0000000000000001 00000000c777b000 0000000000000001
Call Trace:
 [<ffffffff81eb2329>] __dump_stack lib/dump_stack.c:15 [inline]
 [<ffffffff81eb2329>] dump_stack+0xc1/0x128 lib/dump_stack.c:51
 [<ffffffff814262d4>] print_circular_bug.cold.51+0x1bd/0x27d kernel/locking/lockdep.c:1202
 [<ffffffff81239179>] check_prev_add kernel/locking/lockdep.c:1828 [inline]
 [<ffffffff81239179>] check_prevs_add kernel/locking/lockdep.c:1938 [inline]
 [<ffffffff81239179>] validate_chain kernel/locking/lockdep.c:2265 [inline]
 [<ffffffff81239179>] __lock_acquire+0x3019/0x4070 kernel/locking/lockdep.c:3345
 [<ffffffff8123ac40>] lock_acquire+0x130/0x3e0 kernel/locking/lockdep.c:3756
 [<ffffffff830226a6>] lock_sock_nested+0xc6/0x120 net/core/sock.c:2511
 [<ffffffff832f48fb>] lock_sock include/net/sock.h:1404 [inline]
 [<ffffffff832f48fb>] set_mcast_if net/netfilter/ipvs/ip_vs_sync.c:1370 [inline]
 [<ffffffff832f48fb>] make_send_sock net/netfilter/ipvs/ip_vs_sync.c:1490 [inline]
 [<ffffffff832f48fb>] start_sync_thread+0x88b/0x1e80 net/netfilter/ipvs/ip_vs_sync.c:1885
 [<ffffffff832e1d48>] do_ip_vs_set_ctl+0x7c8/0xc00 net/netfilter/ipvs/ip_vs_ctl.c:2398
 [<ffffffff831dcf3d>] nf_sockopt net/netfilter/nf_sockopt.c:105 [inline]
 [<ffffffff831dcf3d>] nf_setsockopt+0x6d/0xc0 net/netfilter/nf_sockopt.c:114
 [<ffffffff8334717a>] ip_setsockopt+0x9a/0xb0 net/ipv4/ip_sockglue.c:1247
 [<ffffffff833f5d0a>] udp_setsockopt+0x4a/0x90 net/ipv4/udp.c:2091
 [<ffffffff8301b75a>] sock_common_setsockopt+0x9a/0xe0 net/core/sock.c:2706
 [<ffffffff83018516>] SYSC_setsockopt net/socket.c:1772 [inline]
 [<ffffffff83018516>] SyS_setsockopt+0x166/0x260 net/socket.c:1751
 [<ffffffff81006316>] do_syscall_64+0x1a6/0x490 arch/x86/entry/common.c:282
 [<ffffffff839f7cd3>] entry_SYSCALL_64_after_swapgs+0x5d/0xdb
IPVS: sync thread started: state = MASTER, mcast_ifn = syz_tun, syncid = 0, id = 0
IPVS: stopping master sync thread 11251 ...
IPVS: sync thread started: state = MASTER, mcast_ifn = syz_tun, syncid = 0, id = 0
IPVS: stopping master sync thread 11253 ...
9pnet_virtio: no channels available for device ./file0
netlink: 4 bytes leftover after parsing attributes in process `syz-executor1'.
IPVS: stopping master sync thread 11286 ...
IPVS: sync thread started: state = MASTER, mcast_ifn = syz_tun, syncid = 0, id = 0
netlink: 4 bytes leftover after parsing attributes in process `syz-executor1'.
netlink: 4 bytes leftover after parsing attributes in process `syz-executor1'.
9pnet_virtio: no channels available for device ./file0
9pnet_virtio: no channels available for device ./file0
9pnet_virtio: no channels available for device ./file0
IPVS: stopping master sync thread 11303 ...
IPVS: stopping master sync thread 11316 ...
IPVS: sync thread started: state = MASTER, mcast_ifn = syz_tun, syncid = 0, id = 0
9pnet_virtio: no channels available for device ./file0
9pnet_virtio: no channels available for device ./file0
IPVS: stopping master sync thread 11349 ...
IPVS: sync thread started: state = MASTER, mcast_ifn = syz_tun, syncid = 0, id = 0
9pnet_virtio: no channels available for device ./file0
9pnet_virtio: no channels available for device ./file0
9pnet_virtio: no channels available for device ./file0
IPVS: stopping master sync thread 11393 ...
9pnet_virtio: no channels available for device ./file0
Dev loop2: unable to read RDB block 1
 loop2: unable to read partition table
loop2: partition table beyond EOD, truncated
loop_reread_partitions: partition scan of loop2 () failed (rc=-5)
Dev loop2: unable to read RDB block 1
 loop2: unable to read partition table
loop2: partition table beyond EOD, truncated
loop_reread_partitions: partition scan of loop2 () failed (rc=-5)
Dev loop2: unable to read RDB block 1
 loop2: unable to read partition table
loop2: partition table beyond EOD, truncated
loop_reread_partitions: partition scan of loop2 () failed (rc=-5)
Dev loop2: unable to read RDB block 1
 loop2: unable to read partition table
loop2: partition table beyond EOD, truncated
loop_reread_partitions: partition scan of loop2 () failed (rc=-5)
Dev loop2: unable to read RDB block 1
 loop2: unable to read partition table
loop2: partition table beyond EOD, truncated
loop_reread_partitions: partition scan of loop2 () failed (rc=-5)
BTRFS: device label d+Q��'���S
EXT2-fs (loop6): error: #blocks per group too big: 59392
devid 2530879793048935964 transid 756082810144684242 /dev/loop4
BTRFS error (device loop4): unsupported checksum algorithm 3786
BTRFS error (device loop4): superblock checksum mismatch
BTRFS error (device loop4): open_ctree failed
BTRFS error (device loop4): unsupported checksum algorithm 3786
BTRFS error (device loop4): superblock checksum mismatch
EXT2-fs (loop6): error: #blocks per group too big: 59392
BTRFS error (device loop4): open_ctree failed
EXT2-fs (loop6): error: #blocks per group too big: 59392
BTRFS error (device loop4): unsupported checksum algorithm 3786
BTRFS error (device loop4): superblock checksum mismatch
BTRFS error (device loop4): open_ctree failed
BTRFS error (device loop4): unsupported checksum algorithm 3786
BTRFS error (device loop4): superblock checksum mismatch
BTRFS error (device loop4): open_ctree failed
BTRFS error (device loop4): unsupported checksum algorithm 3786
BTRFS error (device loop4): superblock checksum mismatch
BTRFS error (device loop4): open_ctree failed
PM: Marking nosave pages: [mem 0x00000000-0x00000fff]
PM: Marking nosave pages: [mem 0x0009f000-0x000fffff]
PM: Marking nosave pages: [mem 0xbfff3000-0xffffffff]
PM: Basic memory bitmaps created