attempt to access beyond end of device loop6: rw=536870912, want=131, limit=112 device lo entered promiscuous mode ====================================================== [ INFO: possible circular locking dependency detected ] 4.9.111-g03c70fe #6 Not tainted ------------------------------------------------------- syz-executor1/8649 is trying to acquire lock: (sk_lock-AF_INET){+.+.+.}, at: [] lock_sock include/net/sock.h:1404 [inline] (sk_lock-AF_INET){+.+.+.}, at: [] inet_bind+0x2a6/0x8b0 net/ipv4/af_inet.c:502 but task is already holding lock: (rtnl_mutex){+.+.+.}, at: [] 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] inet_bind+0x2a6/0x8b0 net/ipv4/af_inet.c:502 make_receive_sock net/netfilter/ipvs/ip_vs_sync.c:1555 [inline] start_sync_thread+0x1356/0x1e80 net/netfilter/ipvs/ip_vs_sync.c:1887 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 tcp_setsockopt+0x88/0xe0 net/ipv4/tcp.c:2758 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-executor1/8649: #0: (rtnl_mutex){+.+.+.}, at: [] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:70 #1: (ipvs->sync_mutex){+.+.+.}, at: [] start_sync_thread+0x118/0x1e80 net/netfilter/ipvs/ip_vs_sync.c:1779 stack backtrace: CPU: 1 PID: 8649 Comm: syz-executor1 Not tainted 4.9.111-g03c70fe #6 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 ffff8801caf3f568 ffffffff81eb2729 ffffffff855e7800 ffffffff8559cef0 ffffffff855e7800 ffff8801cc25d0e8 ffff8801cc25c800 ffff8801caf3f5b0 ffffffff814263a4 0000000000000001 00000000cc25c800 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 [] lock_sock_nested+0xc6/0x120 net/core/sock.c:2511 [] lock_sock include/net/sock.h:1404 [inline] [] inet_bind+0x2a6/0x8b0 net/ipv4/af_inet.c:502 [] make_receive_sock net/netfilter/ipvs/ip_vs_sync.c:1555 [inline] [] start_sync_thread+0x1356/0x1e80 net/netfilter/ipvs/ip_vs_sync.c:1887 [] 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 [] tcp_setsockopt+0x88/0xe0 net/ipv4/tcp.c:2758 [] 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 IPVS: sync thread started: state = BACKUP, mcast_ifn = lo, syncid = 0, id = 0 IPVS: sync thread started: state = MASTER, mcast_ifn = lo, syncid = 0, id = 0 attempt to access beyond end of device loop7: rw=536870912, want=130, limit=112 attempt to access beyond end of device loop7: rw=536870912, want=131, limit=112 attempt to access beyond end of device loop7: rw=536870912, want=132, limit=112 attempt to access beyond end of device loop7: rw=536870912, want=133, limit=112 attempt to access beyond end of device loop7: rw=536870912, want=142, limit=112 attempt to access beyond end of device loop7: rw=536870912, want=143, limit=112 attempt to access beyond end of device loop7: rw=536870912, want=144, limit=112 attempt to access beyond end of device loop7: rw=536870912, want=145, limit=112 attempt to access beyond end of device loop7: rw=536870912, want=2193, limit=112 attempt to access beyond end of device loop7: rw=536870912, want=4241, limit=112 attempt to access beyond end of device loop7: rw=536870912, want=6289, limit=112 attempt to access beyond end of device loop7: rw=536870912, want=8337, limit=112 attempt to access beyond end of device loop7: rw=536870912, want=10385, limit=112 attempt to access beyond end of device loop7: rw=536870912, want=12433, limit=112 attempt to access beyond end of device loop7: rw=536870912, want=14481, limit=112 attempt to access beyond end of device loop7: rw=536870912, want=16529, limit=112 attempt to access beyond end of device loop7: rw=536870912, want=18577, limit=112 attempt to access beyond end of device loop7: rw=536870912, want=20625, limit=112 attempt to access beyond end of device loop7: rw=536870912, want=22673, limit=112 attempt to access beyond end of device loop7: rw=536870912, want=24721, limit=112 attempt to access beyond end of device loop7: rw=536870912, want=26769, limit=112 attempt to access beyond end of device loop7: rw=536870912, want=28817, limit=112 attempt to access beyond end of device loop7: rw=536870912, want=30865, limit=112 attempt to access beyond end of device loop7: rw=536870912, want=32889, limit=112 pktgen: kernel_thread() failed for cpu 0 pktgen: Cannot create thread for cpu 0 (-4) pktgen: kernel_thread() failed for cpu 1 pktgen: Cannot create thread for cpu 1 (-4) pktgen: Initialization failed for all threads IPv6: Can't replace route, no match found FAT-fs (loop5): bogus number of reserved sectors FAT-fs (loop5): Can't find a valid FAT filesystem ISOFS: Unable to identify CD-ROM format. ISOFS: Unable to identify CD-ROM format. pktgen: kernel_thread() failed for cpu 0 pktgen: Cannot create thread for cpu 0 (-4) pktgen: kernel_thread() failed for cpu 1 pktgen: Cannot create thread for cpu 1 (-4) pktgen: Initialization failed for all threads FAT-fs (loop4): bogus number of reserved sectors FAT-fs (loop4): Can't find a valid FAT filesystem pktgen: kernel_thread() failed for cpu 0 pktgen: Cannot create thread for cpu 0 (-4) pktgen: kernel_thread() failed for cpu 1 pktgen: Cannot create thread for cpu 1 (-4) pktgen: Initialization failed for all threads blk_update_request: 250 callbacks suppressed blk_update_request: I/O error, dev loop0, sector 0 blk_update_request: I/O error, dev loop0, sector 8 blk_update_request: I/O error, dev loop0, sector 16 blk_update_request: I/O error, dev loop0, sector 24 blk_update_request: I/O error, dev loop0, sector 32 blk_update_request: I/O error, dev loop0, sector 40 blk_update_request: I/O error, dev loop0, sector 48 blk_update_request: I/O error, dev loop0, sector 56 blk_update_request: I/O error, dev loop0, sector 64 blk_update_request: I/O error, dev loop0, sector 72 attempt to access beyond end of device loop7: rw=536870912, want=114, limit=112 attempt to access beyond end of device loop7: rw=536870912, want=115, limit=112 attempt to access beyond end of device loop7: rw=536870912, want=116, limit=112 attempt to access beyond end of device loop7: rw=536870912, want=117, limit=112 attempt to access beyond end of device loop7: rw=536870912, want=130, limit=112 attempt to access beyond end of device loop7: rw=536870912, want=131, limit=112 attempt to access beyond end of device loop7: rw=536870912, want=132, limit=112 attempt to access beyond end of device loop7: rw=536870912, want=133, limit=112 attempt to access beyond end of device loop7: rw=536870912, want=2189, limit=112 attempt to access beyond end of device loop7: rw=536870912, want=4237, limit=112 attempt to access beyond end of device loop7: rw=536870912, want=6285, limit=112 attempt to access beyond end of device loop7: rw=536870912, want=8333, limit=112 attempt to access beyond end of device loop7: rw=536870912, want=10381, limit=112 attempt to access beyond end of device loop7: rw=536870912, want=12429, limit=112 attempt to access beyond end of device loop7: rw=536870912, want=14477, limit=112 attempt to access beyond end of device loop7: rw=536870912, want=16525, limit=112 attempt to access beyond end of device loop7: rw=536870912, want=18573, limit=112 attempt to access beyond end of device loop7: rw=536870912, want=20621, limit=112 attempt to access beyond end of device loop7: rw=536870912, want=22669, limit=112 attempt to access beyond end of device loop7: rw=536870912, want=24717, limit=112 attempt to access beyond end of device loop7: rw=536870912, want=26765, limit=112 attempt to access beyond end of device loop7: rw=536870912, want=28813, limit=112 attempt to access beyond end of device loop7: rw=536870912, want=30861, limit=112 attempt to access beyond end of device loop7: rw=536870912, want=32885, limit=112 pktgen: kernel_thread() failed for cpu 0 pktgen: Cannot create thread for cpu 0 (-4) pktgen: kernel_thread() failed for cpu 1 pktgen: Cannot create thread for cpu 1 (-4) pktgen: Initialization failed for all threads pktgen: kernel_thread() failed for cpu 0 pktgen: Cannot create thread for cpu 0 (-4) pktgen: kernel_thread() failed for cpu 1 pktgen: Cannot create thread for cpu 1 (-4) pktgen: Initialization failed for all threads pktgen: kernel_thread() failed for cpu 0 pktgen: Cannot create thread for cpu 0 (-4) pktgen: kernel_thread() failed for cpu 1 pktgen: Cannot create thread for cpu 1 (-4) pktgen: Initialization failed for all threads FAT-fs (loop5): bogus number of reserved sectors FAT-fs (loop5): Can't find a valid FAT filesystem buffer_io_error: 315 callbacks suppressed Buffer I/O error on dev loop6, logical block 130, lost async page write attempt to access beyond end of device loop6: rw=536870912, want=132, limit=112 Buffer I/O error on dev loop6, logical block 131, lost async page write attempt to access beyond end of device loop6: rw=536870912, want=133, limit=112 Buffer I/O error on dev loop6, logical block 132, lost async page write attempt to access beyond end of device loop6: rw=536870912, want=142, limit=112 Buffer I/O error on dev loop6, logical block 141, lost async page write attempt to access beyond end of device loop6: rw=536870912, want=143, limit=112 Buffer I/O error on dev loop6, logical block 142, lost async page write attempt to access beyond end of device loop6: rw=536870912, want=144, limit=112 Buffer I/O error on dev loop6, logical block 143, lost async page write attempt to access beyond end of device loop6: rw=536870912, want=145, limit=112 Buffer I/O error on dev loop6, logical block 144, lost async page write pktgen: kernel_thread() failed for cpu 0 attempt to access beyond end of device loop6: rw=536870912, want=2193, limit=112 attempt to access beyond end of device loop6: rw=536870912, want=4241, limit=112 attempt to access beyond end of device loop6: rw=536870912, want=6289, limit=112 attempt to access beyond end of device loop6: rw=536870912, want=8337, limit=112 attempt to access beyond end of device loop6: rw=536870912, want=10385, limit=112 attempt to access beyond end of device loop6: rw=536870912, want=12433, limit=112 attempt to access beyond end of device loop6: rw=536870912, want=14481, limit=112 attempt to access beyond end of device loop6: rw=536870912, want=16529, limit=112 attempt to access beyond end of device loop6: rw=536870912, want=18577, limit=112 attempt to access beyond end of device loop6: rw=536870912, want=20625, limit=112 attempt to access beyond end of device loop6: rw=536870912, want=22673, limit=112 attempt to access beyond end of device loop6: rw=536870912, want=24721, limit=112 attempt to access beyond end of device loop6: rw=536870912, want=26769, limit=112 attempt to access beyond end of device loop6: rw=536870912, want=28817, limit=112 attempt to access beyond end of device loop6: rw=536870912, want=30865, limit=112 attempt to access beyond end of device loop6: rw=536870912, want=32889, limit=112 pktgen: Cannot create thread for cpu 0 (-4) pktgen: kernel_thread() failed for cpu 1 pktgen: Cannot create thread for cpu 1 (-4) pktgen: Initialization failed for all threads attempt to access beyond end of device loop6: rw=536870912, want=114, limit=112 pktgen: kernel_thread() failed for cpu 0 pktgen: Cannot create thread for cpu 0 (-4) pktgen: kernel_thread() failed for cpu 1 pktgen: Cannot create thread for cpu 1 (-4) pktgen: Initialization failed for all threads Buffer I/O error on dev loop0, logical block 0, lost async page write Buffer I/O error on dev loop0, logical block 1, lost async page write Buffer I/O error on dev loop0, logical block 2, lost async page write attempt to access beyond end of device loop6: rw=536870912, want=115, limit=112 attempt to access beyond end of device loop6: rw=536870912, want=116, limit=112 attempt to access beyond end of device loop6: rw=536870912, want=117, limit=112 attempt to access beyond end of device pktgen: kernel_thread() failed for cpu 1 pktgen: Cannot create thread for cpu 1 (-4) loop6: rw=536870912, want=130, limit=112 IPVS: Creating netns size=2536 id=14 attempt to access beyond end of device loop6: rw=536870912, want=131, limit=112 attempt to access beyond end of device loop6: rw=536870912, want=132, limit=112 attempt to access beyond end of device loop6: rw=536870912, want=133, limit=112 attempt to access beyond end of device loop6: rw=536870912, want=2189, limit=112 attempt to access beyond end of device loop6: rw=536870912, want=4237, limit=112 IPVS: Creating netns size=2536 id=15 attempt to access beyond end of device device lo entered promiscuous mode IPVS: Creating netns size=2536 id=16 IPVS: sync thread started: state = BACKUP, mcast_ifn = lo, syncid = 0, id = 0 IPVS: You probably need to specify IP address on multicast interface. IPVS: sync thread started: state = MASTER, mcast_ifn = lo, syncid = 0, id = 0 IPVS: Creating netns size=2536 id=17 device lo entered promiscuous mode device lo entered promiscuous mode IPVS: You probably need to specify IP address on multicast interface. IPVS: sync thread started: state = BACKUP, mcast_ifn = lo, syncid = 0, id = 0 IPVS: sync thread started: state = MASTER, mcast_ifn = lo, syncid = 0, id = 0 IPVS: You probably need to specify IP address on multicast interface. IPVS: sync thread started: state = BACKUP, mcast_ifn = lo, syncid = 0, id = 0 IPVS: sync thread started: state = MASTER, mcast_ifn = lo, syncid = 0, id = 0 loop6: rw=536870912, want=6285, limit=112 attempt to access beyond end of device loop6: rw=536870912, want=8333, limit=112 attempt to access beyond end of device loop6: rw=536870912, want=10381, limit=112 attempt to access beyond end of device loop6: rw=536870912, want=12429, limit=112 attempt to access beyond end of device loop6: rw=536870912, want=14477, limit=112 attempt to access beyond end of device loop6: rw=536870912, want=16525, limit=112 attempt to access beyond end of device loop6: rw=536870912, want=18573, limit=112 attempt to access beyond end of device loop6: rw=536870912, want=20621, limit=112 attempt to access beyond end of device loop6: rw=536870912, want=22669, limit=112 attempt to access beyond end of device loop6: rw=536870912, want=24717, limit=112 attempt to access beyond end of device loop6: rw=536870912, want=26765, limit=112 attempt to access beyond end of device loop6: rw=536870912, want=28813, limit=112 attempt to access beyond end of device loop6: rw=536870912, want=30861, limit=112 attempt to access beyond end of device loop6: rw=536870912, want=32885, limit=112 IPVS: Creating netns size=2536 id=18 device lo entered promiscuous mode IPVS: sync thread started: state = BACKUP, mcast_ifn = lo, syncid = 0, id = 0 IPVS: You probably need to specify IP address on multicast interface. IPVS: sync thread started: state = MASTER, mcast_ifn = lo, syncid = 0, id = 0 IPVS: Creating netns size=2536 id=19 device lo entered promiscuous mode IPVS: Creating netns size=2536 id=20 IPVS: You probably need to specify IP address on multicast interface. IPVS: sync thread started: state = BACKUP, mcast_ifn = lo, syncid = 0, id = 0 IPVS: sync thread started: state = MASTER, mcast_ifn = lo, syncid = 0, id = 0 device lo entered promiscuous mode IPVS: You probably need to specify IP address on multicast interface. IPVS: sync thread started: state = BACKUP, mcast_ifn = lo, syncid = 0, id = 0 IPVS: sync thread started: state = MASTER, mcast_ifn = lo, syncid = 0, id = 0 IPVS: Creating netns size=2536 id=21 device lo entered promiscuous mode IPVS: You probably need to specify IP address on multicast interface. IPVS: sync thread started: state = BACKUP, mcast_ifn = lo, syncid = 0, id = 0 IPVS: sync thread started: state = MASTER, mcast_ifn = lo, syncid = 0, id = 0 IPVS: stopping master sync thread 8875 ... IPVS: stopping backup sync thread 8874 ... IPVS: stopping master sync thread 8845 ... IPVS: stopping backup sync thread 8842 ... IPVS: stopping master sync thread 8840 ... IPVS: stopping backup sync thread 8834 ... IPVS: stopping master sync thread 8828 ... IPVS: stopping backup sync thread 8827 ... device lo entered promiscuous mode device lo entered promiscuous mode IPVS: sync thread started: state = BACKUP, mcast_ifn = lo, syncid = 0, id = 0 device lo entered promiscuous mode IPVS: sync thread started: state = BACKUP, mcast_ifn = lo, syncid = 0, id = 0 IPVS: sync thread started: state = MASTER, mcast_ifn = lo, syncid = 0, id = 0 IPVS: sync thread started: state = BACKUP, mcast_ifn = lo, syncid = 0, id = 0 IPVS: sync thread started: state = MASTER, mcast_ifn = lo, syncid = 0, id = 0 IPVS: sync thread started: state = MASTER, mcast_ifn = lo, syncid = 0, id = 0 pktgen: kernel_thread() failed for cpu 0 pktgen: Cannot create thread for cpu 0 (-4) pktgen: kernel_thread() failed for cpu 1 pktgen: Cannot create thread for cpu 1 (-4) pktgen: Initialization failed for all threads pktgen: kernel_thread() failed for cpu 0 pktgen: Cannot create thread for cpu 0 (-4) pktgen: kernel_thread() failed for cpu 1 pktgen: Cannot create thread for cpu 1 (-4) pktgen: Initialization failed for all threads pktgen: kernel_thread() failed for cpu 0 pktgen: Cannot create thread for cpu 0 (-4) pktgen: kernel_thread() failed for cpu 1 pktgen: Cannot create thread for cpu 1 (-4) pktgen: Initialization failed for all threads blk_update_request: 1028 callbacks suppressed blk_update_request: I/O error, dev loop0, sector 0 buffer_io_error: 783 callbacks suppressed Buffer I/O error on dev loop0, logical block 0, lost async page write blk_update_request: I/O error, dev loop0, sector 8 Buffer I/O error on dev loop0, logical block 1, lost async page write blk_update_request: I/O error, dev loop0, sector 16 Buffer I/O error on dev loop0, logical block 2, lost async page write blk_update_request: I/O error, dev loop0, sector 24 Buffer I/O error on dev loop0, logical block 3, lost async page write blk_update_request: I/O error, dev loop0, sector 32 Buffer I/O error on dev loop0, logical block 4, lost async page write blk_update_request: I/O error, dev loop0, sector 40 Buffer I/O error on dev loop0, logical block 5, lost async page write blk_update_request: I/O error, dev loop0, sector 48 Buffer I/O error on dev loop0, logical block 6, lost async page write blk_update_request: I/O error, dev loop0, sector 56 Buffer I/O error on dev loop0, logical block 7, lost async page write blk_update_request: I/O error, dev loop0, sector 64 Buffer I/O error on dev loop0, logical block 8, lost async page write blk_update_request: I/O error, dev loop0, sector 72 Buffer I/O error on dev loop0, logical block 9, lost async page write IPVS: stopping master sync thread 8888 ... IPVS: stopping backup sync thread 8887 ... IPVS: stopping master sync thread 8885 ... IPVS: stopping backup sync thread 8884 ... IPVS: stopping master sync thread 8880 ... IPVS: stopping backup sync thread 8879 ...