binder: 7317:7322 ioctl c0306201 20c6dfd0 returned -22 ====================================================== [ INFO: possible circular locking dependency detected ] 4.9.110-g00a0bcb #4 Not tainted ------------------------------------------------------- syz-executor0/7352 is trying to acquire lock: (sk_lock-AF_INET){+.+.+.}, at: [] lock_sock include/net/sock.h:1404 [inline] (sk_lock-AF_INET){+.+.+.}, at: [] do_ip_setsockopt.isra.13+0x12a/0x2b10 net/ipv4/ip_sockglue.c:636 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] 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 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 *** 1 lock held by syz-executor0/7352: #0: (rtnl_mutex){+.+.+.}, at: [] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:70 stack backtrace: CPU: 1 PID: 7352 Comm: syz-executor0 Not tainted 4.9.110-g00a0bcb #4 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 ffff8801d9007758 ffffffff81eb2329 ffffffff855e79b0 ffffffff8559cef0 ffffffff855e79b0 ffff8801a21ea0e8 ffff8801a21e9800 ffff8801d90077a0 ffffffff814262d4 0000000000000001 00000000a21e9800 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] [] 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 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 PM: Basic memory bitmaps freed 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 PM: Basic memory bitmaps freed IPVS: Creating netns size=2536 id=12 IPVS: Creating netns size=2536 id=13 attempt to access beyond end of device loop2: rw=536870984, want=130, limit=112 attempt to access beyond end of device loop2: rw=536870984, want=131, limit=112 attempt to access beyond end of device loop2: rw=536870984, want=132, limit=112 attempt to access beyond end of device loop2: rw=536870984, want=133, limit=112 attempt to access beyond end of device loop2: rw=536870984, want=142, limit=112 attempt to access beyond end of device loop2: rw=536870984, want=143, limit=112 attempt to access beyond end of device loop2: rw=536870984, want=144, limit=112 attempt to access beyond end of device loop2: rw=536870984, want=145, limit=112 FAT-fs (loop2): error, fat_free_clusters: deleting FAT entry beyond EOF FAT-fs (loop2): Filesystem has been set read-only 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 IPVS: Creating netns size=2536 id=14 IPVS: Creating netns size=2536 id=15 IPVS: Creating netns size=2536 id=16 FAT-fs (loop2): bogus number of reserved sectors FAT-fs (loop6): bogus number of reserved sectors FAT-fs (loop6): Can't find a valid FAT filesystem FAT-fs (loop2): Can't find a valid FAT filesystem IPVS: Creating netns size=2536 id=17 FAT-fs (loop6): bogus number of reserved sectors FAT-fs (loop6): Can't find a valid FAT filesystem FAT-fs (loop6): bogus number of reserved sectors FAT-fs (loop2): bogus number of reserved sectors FAT-fs (loop2): Can't find a valid FAT filesystem FAT-fs (loop6): Can't find a valid FAT filesystem FAT-fs (loop2): bogus number of reserved sectors FAT-fs (loop2): Can't find a valid FAT filesystem FAT-fs (loop2): bogus number of reserved sectors FAT-fs (loop6): bogus number of reserved sectors FAT-fs (loop6): Can't find a valid FAT filesystem FAT-fs (loop2): 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 FAT-fs (loop6): invalid media value (0x00) FAT-fs (loop2): bogus number of reserved sectors FAT-fs (loop2): Can't find a valid FAT filesystem FAT-fs (loop6): Can't find a valid FAT filesystem IPVS: Creating netns size=2536 id=18 FAT-fs (loop2): bogus number of reserved sectors FAT-fs (loop2): Can't find a valid FAT filesystem FAT-fs (loop2): bogus number of reserved sectors FAT-fs (loop6): invalid media value (0x00) FAT-fs (loop6): Can't find a valid FAT filesystem FAT-fs (loop2): Can't find a valid FAT filesystem FAT-fs (loop6): invalid media value (0x00) FAT-fs (loop2): bogus number of reserved sectors FAT-fs (loop2): Can't find a valid FAT filesystem FAT-fs (loop6): Can't find a valid FAT filesystem FAT-fs (loop2): bogus number of reserved sectors FAT-fs (loop2): Can't find a valid FAT filesystem IPVS: Creating netns size=2536 id=19 FAT-fs (loop2): bogus number of reserved sectors FAT-fs (loop2): Can't find a valid FAT filesystem FAT-fs (loop2): bogus number of reserved sectors IPVS: Creating netns size=2536 id=20 FAT-fs (loop2): Can't find a valid FAT filesystem