================================ WARNING: inconsistent lock state 4.15.0-rc9+ #283 Not tainted -------------------------------- inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. syz-executor1/3741 [HC0[0]:SC1[1]:HE1:SE0] takes: (&(&est->lock)->rlock){+.?.}, at: [<00000000ec4f069c>] spin_lock include/linux/spinlock.h:310 [inline] (&(&est->lock)->rlock){+.?.}, at: [<00000000ec4f069c>] est_fetch_counters+0x4f/0x150 net/core/gen_estimator.c:70 {SOFTIRQ-ON-W} state was registered at: lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:3914 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:144 spin_lock include/linux/spinlock.h:310 [inline] est_fetch_counters+0x4f/0x150 net/core/gen_estimator.c:70 gen_new_estimator+0x317/0x770 net/core/gen_estimator.c:162 xt_rateest_tg_checkentry+0x487/0xaa0 net/netfilter/xt_RATEEST.c:135 xt_check_target+0x22c/0x7d0 net/netfilter/x_tables.c:845 check_target net/ipv6/netfilter/ip6_tables.c:538 [inline] find_check_entry.isra.7+0x935/0xcf0 net/ipv6/netfilter/ip6_tables.c:580 translate_table+0xf52/0x1690 net/ipv6/netfilter/ip6_tables.c:749 do_replace net/ipv6/netfilter/ip6_tables.c:1167 [inline] do_ip6t_set_ctl+0x370/0x5f0 net/ipv6/netfilter/ip6_tables.c:1693 nf_sockopt net/netfilter/nf_sockopt.c:106 [inline] nf_setsockopt+0x67/0xc0 net/netfilter/nf_sockopt.c:115 ipv6_setsockopt+0x115/0x150 net/ipv6/ipv6_sockglue.c:928 udpv6_setsockopt+0x45/0x80 net/ipv6/udp.c:1452 sock_common_setsockopt+0x95/0xd0 net/core/sock.c:2968 SYSC_setsockopt net/socket.c:1831 [inline] SyS_setsockopt+0x189/0x360 net/socket.c:1810 entry_SYSCALL_64_fastpath+0x29/0xa0 irq event stamp: 193626 hardirqs last enabled at (193626): [<00000000e7e72f3e>] __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:168 [inline] hardirqs last enabled at (193626): [<00000000e7e72f3e>] _raw_spin_unlock_irq+0x27/0x70 kernel/locking/spinlock.c:192 hardirqs last disabled at (193625): [<000000002bb2d70e>] __raw_spin_lock_irq include/linux/spinlock_api_smp.h:126 [inline] hardirqs last disabled at (193625): [<000000002bb2d70e>] _raw_spin_lock_irq+0x3c/0x80 kernel/locking/spinlock.c:160 softirqs last enabled at (193106): [<00000000807b47f9>] __do_softirq+0x7a0/0xb85 kernel/softirq.c:311 softirqs last disabled at (193597): [<0000000091a021be>] invoke_softirq kernel/softirq.c:365 [inline] softirqs last disabled at (193597): [<0000000091a021be>] irq_exit+0x1cc/0x200 kernel/softirq.c:405 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&(&est->lock)->rlock); lock(&(&est->lock)->rlock); *** DEADLOCK *** 1 lock held by syz-executor1/3741: #0: ((&est->timer)){+.-.}, at: [<000000006e974e46>] lockdep_copy_map include/linux/lockdep.h:178 [inline] #0: ((&est->timer)){+.-.}, at: [<000000006e974e46>] call_timer_fn+0x1c6/0x820 kernel/time/timer.c:1308 stack backtrace: CPU: 1 PID: 3741 Comm: syz-executor1 Not tainted 4.15.0-rc9+ #283 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x194/0x257 lib/dump_stack.c:53 print_usage_bug+0x377/0x38c kernel/locking/lockdep.c:2537 valid_state kernel/locking/lockdep.c:2550 [inline] mark_lock_irq kernel/locking/lockdep.c:2744 [inline] mark_lock+0xf61/0x1430 kernel/locking/lockdep.c:3142 mark_irqflags kernel/locking/lockdep.c:3020 [inline] __lock_acquire+0x173a/0x3e00 kernel/locking/lockdep.c:3383 lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:3914 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:144 spin_lock include/linux/spinlock.h:310 [inline] est_fetch_counters+0x4f/0x150 net/core/gen_estimator.c:70 est_timer+0x97/0x7c0 net/core/gen_estimator.c:85 call_timer_fn+0x228/0x820 kernel/time/timer.c:1318 expire_timers kernel/time/timer.c:1355 [inline] __run_timers+0x7ee/0xb70 kernel/time/timer.c:1658 run_timer_softirq+0x4c/0x70 kernel/time/timer.c:1684 __do_softirq+0x2d7/0xb85 kernel/softirq.c:285 invoke_softirq kernel/softirq.c:365 [inline] irq_exit+0x1cc/0x200 kernel/softirq.c:405 exiting_irq arch/x86/include/asm/apic.h:541 [inline] do_IRQ+0xeb/0x190 arch/x86/kernel/irq.c:241 common_interrupt+0xa9/0xa9 arch/x86/entry/entry_64.S:712 RIP: 0010:__sanitizer_cov_trace_pc+0xd/0x50 kernel/kcov.c:94 RSP: 0018:ffff8801a700fb38 EFLAGS: 00000246 ORIG_RAX: ffffffffffffffd5 RAX: ffff8801c2b94400 RBX: 1ffff10034e01f6c RCX: ffffffff816041ab RDX: dffffc0000000000 RSI: 00000000ffffffff RDI: ffff8801db325da0 RBP: ffff8801a700fb38 R08: ffff8801db32c2d8 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffff8801a700fe00 R13: 0000000000000000 R14: dffffc0000000000 R15: ffff8801c2b94400 hrtimer_try_to_cancel+0x9a/0x5d0 kernel/time/hrtimer.c:1004 hrtimer_cancel kernel/time/hrtimer.c:1030 [inline] do_nanosleep+0x32c/0x6e0 kernel/time/hrtimer.c:1473 hrtimer_nanosleep+0x27b/0x4d0 kernel/time/hrtimer.c:1525 SYSC_nanosleep kernel/time/hrtimer.c:1557 [inline] SyS_nanosleep+0x175/0x1f0 kernel/time/hrtimer.c:1544 entry_SYSCALL_64_fastpath+0x29/0xa0 RIP: 0033:0x47e980 RSP: 002b:0000000000a2f578 EFLAGS: 00000246 ORIG_RAX: 0000000000000023 RAX: ffffffffffffffda RBX: 00000000006fb968 RCX: 000000000047e980 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000a2f580 RBP: 00000000006fafe0 R08: 0000000000000001 R09: 0000000001b7d940 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000013 R13: 00000000006fb968 R14: 0000000000009fe5 R15: 0000000000000001 kauditd_printk_skb: 72 callbacks suppressed audit: type=1400 audit(1517131455.139:97): avc: denied { map } for pid=5920 comm="syz-executor6" path="/dev/binder0" dev="devtmpfs" ino=9139 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:device_t:s0 tclass=chr_file permissive=1 binder: 5920:5931 unknown command 0 binder: 5920:5931 ioctl c0306201 2000a000 returned -22 binder: 5920:5931 got transaction with invalid offset (0, min 56 max 56) or object. binder: 5920:5931 transaction failed 29201/-22, size 56-808 line 2966 binder_alloc: binder_alloc_mmap_handler: 5920 20000000-20002000 already mapped failed -16 binder: BINDER_SET_CONTEXT_MGR already set binder: 5920:5931 ioctl 40046207 0 returned -16 binder: 5920:5944 unknown command 0 binder: 5920:5944 ioctl c0306201 2000a000 returned -22 binder: undelivered TRANSACTION_ERROR: 29201 binder: 5950:5959 unknown command 0 binder: 5950:5959 ioctl c0306201 2000a000 returned -22 binder: 5950:5959 got transaction with invalid offset (0, min 56 max 56) or object. binder: 5950:5959 transaction failed 29201/-22, size 56-808 line 2966 dccp_close: ABORT with 13 bytes unread binder: undelivered TRANSACTION_ERROR: 29201 binder: 5965:5972 unknown command 0 binder: 5965:5972 ioctl c0306201 2000a000 returned -22 binder: 5965:5972 got transaction with invalid offset (0, min 56 max 56) or object. binder: 5965:5972 transaction failed 29201/-22, size 56-808 line 2966 binder: undelivered TRANSACTION_ERROR: 29201 binder: 5982:5984 unknown command 0 binder: 5982:5984 ioctl c0306201 2000a000 returned -22 binder: 5982:5984 got transaction with invalid offset (0, min 56 max 56) or object. binder: 5982:5984 transaction failed 29201/-22, size 56-808 line 2966 binder: undelivered TRANSACTION_ERROR: 29201 binder: 5989:5997 unknown command 0 binder: 5989:5997 ioctl c0306201 2000a000 returned -22 binder_alloc: 5989: binder_alloc_buf, no vma binder: 5989:5997 transaction failed 29189/-3, size 56-808 line 2903 QAT: Invalid ioctl binder: undelivered TRANSACTION_ERROR: 29189 binder: 6011:6016 unknown command 0 binder: 6011:6016 ioctl c0306201 2000a000 returned -22 binder_alloc: 6011: binder_alloc_buf, no vma binder: 6011:6016 transaction failed 29189/-3, size 56-808 line 2903 QAT: Invalid ioctl binder: undelivered TRANSACTION_ERROR: 29189 binder: 6033:6046 unknown command 0 binder: 6033:6046 ioctl c0306201 2000a000 returned -22 binder_alloc: 6033: binder_alloc_buf, no vma binder: 6033:6046 transaction failed 29189/-3, size 56-808 line 2903 binder: undelivered TRANSACTION_ERROR: 29189 binder: 6057:6061 got transaction with invalid handle, 0 binder: 6057:6061 transaction failed 29201/-22, size 56-808 line 2995 binder: undelivered TRANSACTION_ERROR: 29201 binder: 6078:6083 got transaction with invalid handle, 0 binder: 6078:6083 transaction failed 29201/-22, size 56-808 line 2995 binder: undelivered TRANSACTION_ERROR: 29201 binder: 6094:6097 got transaction with invalid handle, 0 binder: 6094:6097 transaction failed 29201/-22, size 56-808 line 2995 binder: BINDER_SET_CONTEXT_MGR already set binder: 6095:6103 ioctl 40046207 0 returned -16 binder_alloc: 6094: binder_alloc_buf, no vma binder: 6095:6103 transaction failed 29189/-3, size 56-808 line 2903 binder: undelivered TRANSACTION_ERROR: 29201 binder: undelivered TRANSACTION_ERROR: 29189 audit: type=1400 audit(1517131455.176:98): avc: denied { transfer } for pid=5920 comm="syz-executor6" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=binder permissive=1 audit: type=1326 audit(1517131455.206:99): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=5923 comm="syz-executor7" exe="/root/syz-executor7" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ffc0000 binder: 6106:6118 unknown command 0 binder: 6106:6118 ioctl c0306201 2000a000 returned -22 binder_alloc: 6106: binder_alloc_buf, no vma binder: 6106:6118 transaction failed 29189/-3, size 56-808 line 2903 binder: undelivered TRANSACTION_ERROR: 29189 binder: 6136:6138 unknown command 0 binder: 6136:6138 ioctl c0306201 2000a000 returned -22 binder: 6136:6138 got transaction with invalid offset (0, min 56 max 56) or object. binder: 6136:6138 transaction failed 29201/-22, size 56-808 line 2966 binder: undelivered TRANSACTION_ERROR: 29201 audit: type=1326 audit(1517131455.207:100): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=5923 comm="syz-executor7" exe="/root/syz-executor7" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1326 audit(1517131455.209:101): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=5923 comm="syz-executor7" exe="/root/syz-executor7" sig=0 arch=c000003e syscall=317 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1326 audit(1517131455.209:102): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=5923 comm="syz-executor7" exe="/root/syz-executor7" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1326 audit(1517131455.209:103): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=5923 comm="syz-executor7" exe="/root/syz-executor7" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1326 audit(1517131455.210:104): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=5923 comm="syz-executor7" exe="/root/syz-executor7" sig=0 arch=c000003e syscall=55 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1326 audit(1517131455.211:105): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=5923 comm="syz-executor7" exe="/root/syz-executor7" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1326 audit(1517131455.211:106): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=5923 comm="syz-executor7" exe="/root/syz-executor7" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ffc0000 binder: 6148:6156 unknown command 0 binder: 6148:6156 ioctl c0306201 2000a000 returned -22 binder: 6148:6156 got transaction with invalid offset (0, min 56 max 56) or object. binder: 6148:6156 transaction failed 29201/-22, size 56-808 line 2966 binder: undelivered TRANSACTION_ERROR: 29201