================================ WARNING: inconsistent lock state 4.17.0-rc2+ #22 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. syz-executor3/10231 [HC1[1]:SC0[0]:HE0:SE1] takes: (ptrval) (fs_reclaim){?.+.}, at: fs_reclaim_acquire.part.82+0x0/0x30 mm/page_alloc.c:463 {HARDIRQ-ON-W} state was registered at: lock_acquire+0x1dc/0x520 kernel/locking/lockdep.c:3920 fs_reclaim_acquire.part.82+0x24/0x30 mm/page_alloc.c:3739 fs_reclaim_acquire+0x14/0x20 mm/page_alloc.c:3740 slab_pre_alloc_hook mm/slab.h:418 [inline] slab_alloc_node mm/slab.c:3299 [inline] kmem_cache_alloc_node_trace+0x39/0x770 mm/slab.c:3661 kmalloc_node include/linux/slab.h:550 [inline] kzalloc_node include/linux/slab.h:712 [inline] alloc_worker+0xbd/0x2e0 kernel/workqueue.c:1704 init_rescuer.part.25+0x1f/0x190 kernel/workqueue.c:4000 init_rescuer kernel/workqueue.c:3997 [inline] workqueue_init+0x51f/0x7d0 kernel/workqueue.c:5732 kernel_init_freeable+0x2ad/0x58e init/main.c:1115 kernel_init+0x11/0x1b3 init/main.c:1053 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:412 irq event stamp: 4580 hardirqs last enabled at (4579): [] __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:160 [inline] hardirqs last enabled at (4579): [] _raw_spin_unlock_irqrestore+0x74/0xc0 kernel/locking/spinlock.c:184 hardirqs last disabled at (4580): [] interrupt_entry+0xb5/0xf0 arch/x86/entry/entry_64.S:625 softirqs last enabled at (2948): [] __do_softirq+0x778/0xaf5 kernel/softirq.c:311 softirqs last disabled at (2925): [] do_softirq_own_stack+0x2a/0x40 arch/x86/entry/entry_64.S:1046 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(fs_reclaim); lock(fs_reclaim); *** DEADLOCK *** 1 lock held by syz-executor3/10231: #0: (ptrval) (sk_lock-AF_INET6){+.+.}, at: lock_sock include/net/sock.h:1469 [inline] #0: (ptrval) (sk_lock-AF_INET6){+.+.}, at: sctp_sendmsg+0x125e/0x1d70 net/sctp/socket.c:2062 stack backtrace: CPU: 1 PID: 10231 Comm: syz-executor3 Not tainted 4.17.0-rc2+ #22 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1b9/0x294 lib/dump_stack.c:113 print_usage_bug.cold.59+0x320/0x41a kernel/locking/lockdep.c:2542 valid_state kernel/locking/lockdep.c:2555 [inline] mark_lock_irq kernel/locking/lockdep.c:2749 [inline] mark_lock+0x1034/0x19e0 kernel/locking/lockdep.c:3147 mark_irqflags kernel/locking/lockdep.c:3022 [inline] __lock_acquire+0x1595/0x5140 kernel/locking/lockdep.c:3388 lock_acquire+0x1dc/0x520 kernel/locking/lockdep.c:3920 fs_reclaim_acquire.part.82+0x24/0x30 mm/page_alloc.c:3739 fs_reclaim_acquire+0x14/0x20 mm/page_alloc.c:3740 slab_pre_alloc_hook mm/slab.h:418 [inline] slab_alloc mm/slab.c:3378 [inline] __do_kmalloc mm/slab.c:3716 [inline] __kmalloc+0x45/0x760 mm/slab.c:3727 kmalloc_array include/linux/slab.h:631 [inline] kcalloc include/linux/slab.h:642 [inline] numa_crng_init drivers/char/random.c:798 [inline] crng_reseed+0x427/0x920 drivers/char/random.c:923 credit_entropy_bits+0x98d/0xa30 drivers/char/random.c:708 add_interrupt_randomness+0x494/0x860 drivers/char/random.c:1254 handle_irq_event_percpu+0xf9/0x1c0 kernel/irq/handle.c:191 handle_irq_event+0xa7/0x135 kernel/irq/handle.c:206 handle_edge_irq+0x20f/0x870 kernel/irq/chip.c:791 generic_handle_irq_desc include/linux/irqdesc.h:159 [inline] handle_irq+0x18c/0x2e7 arch/x86/kernel/irq_64.c:77 do_IRQ+0x78/0x190 arch/x86/kernel/irq.c:245 common_interrupt+0xf/0xf arch/x86/entry/entry_64.S:642 RIP: 0010:arch_local_irq_restore arch/x86/include/asm/paravirt.h:783 [inline] RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:160 [inline] RIP: 0010:_raw_spin_unlock_irqrestore+0xa1/0xc0 kernel/locking/spinlock.c:184 RSP: 0018:ffff8801bd3f6970 EFLAGS: 00000286 ORIG_RAX: ffffffffffffffd9 RAX: dffffc0000000000 RBX: 0000000000000286 RCX: 1ffff100332d71f3 RDX: 1ffffffff11a315d RSI: ffff8801996b8f78 RDI: 0000000000000286 RBP: ffff8801bd3f6980 R08: ffff8801996b8f78 R09: 0000000000000006 R10: ffff8801996b8740 R11: 0000000000000000 R12: ffffffff8a85b728 R13: ffff8801bd3f69d0 R14: ffff8801bc1f5070 R15: 000000000000000f debug_object_activate+0x29f/0x670 lib/debugobjects.c:500 debug_rcu_head_queue kernel/rcu/rcu.h:135 [inline] __call_rcu.constprop.68+0xc0/0xbb0 kernel/rcu/tree.c:3018 call_rcu_sched+0x12/0x20 kernel/rcu/tree.c:3097 sctp_transport_destroy net/sctp/transport.c:182 [inline] sctp_transport_put+0x19a/0x1e0 net/sctp/transport.c:329 sctp_transport_free+0xa3/0x120 net/sctp/transport.c:153 sctp_association_free+0x5dd/0x959 net/sctp/associola.c:396 sctp_cmd_delete_tcb net/sctp/sm_sideeffect.c:939 [inline] sctp_cmd_interpreter net/sctp/sm_sideeffect.c:1353 [inline] sctp_side_effects net/sctp/sm_sideeffect.c:1220 [inline] sctp_do_sm+0x49de/0x7160 net/sctp/sm_sideeffect.c:1191 sctp_assoc_bh_rcv+0x30f/0x520 net/sctp/associola.c:1040 sctp_inq_push+0x263/0x320 net/sctp/inqueue.c:95 sctp_backlog_rcv+0x192/0xc00 net/sctp/input.c:350 sk_backlog_rcv include/net/sock.h:909 [inline] __release_sock+0x12f/0x3a0 net/core/sock.c:2338 release_sock+0xa4/0x2b0 net/core/sock.c:2853 sctp_wait_for_connect+0x389/0x620 net/sctp/socket.c:8420 sctp_sendmsg_to_asoc+0x1c03/0x2100 net/sctp/socket.c:1977 sctp_sendmsg+0x13a8/0x1d70 net/sctp/socket.c:2123 inet_sendmsg+0x19f/0x690 net/ipv4/af_inet.c:798 sock_sendmsg_nosec net/socket.c:629 [inline] sock_sendmsg+0xd5/0x120 net/socket.c:639 __sys_sendto+0x3d7/0x670 net/socket.c:1789 __do_sys_sendto net/socket.c:1801 [inline] __se_sys_sendto net/socket.c:1797 [inline] __x64_sys_sendto+0xe1/0x1a0 net/socket.c:1797 do_syscall_64+0x1b1/0x800 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x455979 RSP: 002b:00007f9c6b490c68 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 00007f9c6b4916d4 RCX: 0000000000455979 RDX: 0000000000000001 RSI: 0000000020b31000 RDI: 0000000000000013 RBP: 000000000072bea0 R08: 00000000209e1000 R09: 000000000000001c R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 0000000000000501 R14: 00000000006fa8b8 R15: 0000000000000000 ------------[ cut here ]------------ do not call blocking ops when !TASK_RUNNING; state=1 set at [< (ptrval)>] prepare_to_wait_exclusive+0x126/0x530 kernel/sched/wait.c:243 WARNING: CPU: 1 PID: 10231 at kernel/sched/core.c:6139 __might_sleep+0x13d/0x190 kernel/sched/core.c:6134