================================ WARNING: inconsistent lock state 4.17.0-rc2+ #22 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. syz-executor5/9696 [HC1[1]:SC1[1]:HE0:SE0] 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: 287 hardirqs last enabled at (286): [] slab_alloc mm/slab.c:3385 [inline] hardirqs last enabled at (286): [] kmem_cache_alloc+0x26f/0x760 mm/slab.c:3552 hardirqs last disabled at (287): [] interrupt_entry+0xb5/0xf0 arch/x86/entry/entry_64.S:625 softirqs last enabled at (248): [] __do_softirq+0x778/0xaf5 kernel/softirq.c:311 softirqs last disabled at (277): [] invoke_softirq kernel/softirq.c:365 [inline] softirqs last disabled at (277): [] irq_exit+0x1d1/0x200 kernel/softirq.c:405 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(fs_reclaim); lock(fs_reclaim); *** DEADLOCK *** 3 locks held by syz-executor5/9696: #0: (ptrval) (sb_writers#6){.+.+}, at: sb_start_write include/linux/fs.h:1550 [inline] #0: (ptrval) (sb_writers#6){.+.+}, at: mnt_want_write+0x3f/0xc0 fs/namespace.c:386 #1: (ptrval) (&sb->s_type->i_mutex_key#11/1){+.+.}, at: inode_lock_nested include/linux/fs.h:748 [inline] #1: (ptrval) (&sb->s_type->i_mutex_key#11/1){+.+.}, at: filename_create+0x1aa/0x5a0 fs/namei.c:3606 #2: (ptrval) (rcu_read_lock){....}, at: arch_static_branch arch/x86/include/asm/jump_label.h:36 [inline] #2: (ptrval) (rcu_read_lock){....}, at: static_key_false include/linux/jump_label.h:142 [inline] #2: (ptrval) (rcu_read_lock){....}, at: netif_receive_skb_internal+0xa2/0x7b0 net/core/dev.c:4716 stack backtrace: CPU: 0 PID: 9696 Comm: syz-executor5 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:is_last_task_frame arch/x86/kernel/unwind_frame.c:170 [inline] RIP: 0010:unwind_next_frame.part.7+0x148/0x9c0 arch/x86/kernel/unwind_frame.c:294 RSP: 0018:ffff8801dae063b8 EFLAGS: 00000202 ORIG_RAX: ffffffffffffffd9 RAX: ffff8801c5e80000 RBX: ffff8801dae064d0 RCX: ffff8801dae06480 RDX: ffff8801dae064f8 RSI: ffff8801c5e87f58 RDI: ffff8801c5e87f48 RBP: ffff8801dae064a8 R08: ffff8801dae06508 R09: ffff88019cd98600 R10: ffffed003b5c0ca4 R11: ffff8801dae06527 R12: 1ffff1003b5c0c7c R13: 0000000000000000 R14: ffff8801dae07168 R15: ffff8801dae06520 unwind_next_frame+0x3e/0x50 arch/x86/kernel/unwind_frame.c:287 __save_stack_trace+0x6e/0xd0 arch/x86/kernel/stacktrace.c:44 save_stack_trace+0x1a/0x20 arch/x86/kernel/stacktrace.c:60 save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc+0xc4/0xe0 mm/kasan/kasan.c:553 kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:490 slab_post_alloc_hook mm/slab.h:444 [inline] slab_alloc mm/slab.c:3392 [inline] kmem_cache_alloc+0x11b/0x760 mm/slab.c:3552 skb_clone+0x1ed/0x4f0 net/core/skbuff.c:1282 skb_share_check include/linux/skbuff.h:1516 [inline] packet_rcv_spkt+0x59a/0x730 net/packet/af_packet.c:1848 deliver_skb net/core/dev.c:1925 [inline] deliver_ptype_list_skb net/core/dev.c:1940 [inline] __netif_receive_skb_core+0x1435/0x3630 net/core/dev.c:4586 __netif_receive_skb+0x2c/0x1e0 net/core/dev.c:4668 netif_receive_skb_internal+0x126/0x7b0 net/core/dev.c:4742 napi_skb_finish net/core/dev.c:5104 [inline] napi_gro_receive+0x44d/0x5a0 net/core/dev.c:5135 receive_buf+0xc64/0x2b90 drivers/net/virtio_net.c:959 virtnet_receive drivers/net/virtio_net.c:1214 [inline] virtnet_poll+0x3c8/0xdb5 drivers/net/virtio_net.c:1296 napi_poll net/core/dev.c:5746 [inline] net_rx_action+0x7b7/0x1930 net/core/dev.c:5812 __do_softirq+0x2e0/0xaf5 kernel/softirq.c:285 invoke_softirq kernel/softirq.c:365 [inline] irq_exit+0x1d1/0x200 kernel/softirq.c:405 exiting_irq arch/x86/include/asm/apic.h:525 [inline] do_IRQ+0xf1/0x190 arch/x86/kernel/irq.c:257 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:kmem_cache_free+0xb3/0x2d0 mm/slab.c:3757 RSP: 0018:ffff8801c5e87bf8 EFLAGS: 00000286 ORIG_RAX: ffffffffffffffd9 RAX: 0000000000000007 RBX: ffff8801b742e480 RCX: 1ffff100339b31d0 RDX: 0000000000000000 RSI: ffff88019cd98e60 RDI: 0000000000000286 RBP: ffff8801c5e87c18 R08: ffff88019cd98e38 R09: 0000000000000006 R10: ffff88019cd98600 R11: 0000000000000000 R12: ffff8801da988dc0 R13: 0000000000000286 R14: ffffffff81c46dd2 R15: 0000000000000000 putname+0xf2/0x130 fs/namei.c:261 filename_create+0x2aa/0x5a0 fs/namei.c:3629 user_path_create fs/namei.c:3664 [inline] do_symlinkat+0xf6/0x2b0 fs/namei.c:4117 __do_sys_symlink fs/namei.c:4143 [inline] __se_sys_symlink fs/namei.c:4141 [inline] __x64_sys_symlink+0x59/0x80 fs/namei.c:4141 do_syscall_64+0x1b1/0x800 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x4556a7 RSP: 002b:0000000000a3eab8 EFLAGS: 00000246 ORIG_RAX: 0000000000000058 RAX: ffffffffffffffda RBX: 0000000000000074 RCX: 00000000004556a7 RDX: 0000000000000000 RSI: 00000000004badf3 RDI: 0000000000a3f7f0 RBP: 0000000000000013 R08: 0000000000000000 R09: 0000000000c35940 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000013 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000001380 BUG: sleeping function called from invalid context at mm/slab.h:421 in_atomic(): 1, irqs_disabled(): 1, pid: 9696, name: syz-executor5 INFO: lockdep is turned off. irq event stamp: 287 hardirqs last enabled at (286): [] slab_alloc mm/slab.c:3385 [inline] hardirqs last enabled at (286): [] kmem_cache_alloc+0x26f/0x760 mm/slab.c:3552 hardirqs last disabled at (287): [] interrupt_entry+0xb5/0xf0 arch/x86/entry/entry_64.S:625 softirqs last enabled at (248): [] __do_softirq+0x778/0xaf5 kernel/softirq.c:311 softirqs last disabled at (277): [] invoke_softirq kernel/softirq.c:365 [inline] softirqs last disabled at (277): [] irq_exit+0x1d1/0x200 kernel/softirq.c:405 CPU: 0 PID: 9696 Comm: syz-executor5 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 ___might_sleep.cold.87+0x11f/0x13a kernel/sched/core.c:6188 __might_sleep+0x95/0x190 kernel/sched/core.c:6141 slab_pre_alloc_hook mm/slab.h:421 [inline] slab_alloc mm/slab.c:3378 [inline] __do_kmalloc mm/slab.c:3716 [inline] __kmalloc+0x2b9/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:is_last_task_frame arch/x86/kernel/unwind_frame.c:170 [inline] RIP: 0010:unwind_next_frame.part.7+0x148/0x9c0 arch/x86/kernel/unwind_frame.c:294 RSP: 0018:ffff8801dae063b8 EFLAGS: 00000202 ORIG_RAX: ffffffffffffffd9 RAX: ffff8801c5e80000 RBX: ffff8801dae064d0 RCX: ffff8801dae06480 RDX: ffff8801dae064f8 RSI: ffff8801c5e87f58 RDI: ffff8801c5e87f48 RBP: ffff8801dae064a8 R08: ffff8801dae06508 R09: ffff88019cd98600 R10: ffffed003b5c0ca4 R11: ffff8801dae06527 R12: 1ffff1003b5c0c7c R13: 0000000000000000 R14: ffff8801dae07168 R15: ffff8801dae06520 unwind_next_frame+0x3e/0x50 arch/x86/kernel/unwind_frame.c:287 __save_stack_trace+0x6e/0xd0 arch/x86/kernel/stacktrace.c:44 save_stack_trace+0x1a/0x20 arch/x86/kernel/stacktrace.c:60 save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc+0xc4/0xe0 mm/kasan/kasan.c:553 kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:490 slab_post_alloc_hook mm/slab.h:444 [inline] slab_alloc mm/slab.c:3392 [inline] kmem_cache_alloc+0x11b/0x760 mm/slab.c:3552 skb_clone+0x1ed/0x4f0 net/core/skbuff.c:1282 skb_share_check include/linux/skbuff.h:1516 [inline] packet_rcv_spkt+0x59a/0x730 net/packet/af_packet.c:1848 deliver_skb net/core/dev.c:1925 [inline] deliver_ptype_list_skb net/core/dev.c:1940 [inline] __netif_receive_skb_core+0x1435/0x3630 net/core/dev.c:4586 __netif_receive_skb+0x2c/0x1e0 net/core/dev.c:4668 netif_receive_skb_internal+0x126/0x7b0 net/core/dev.c:4742 napi_skb_finish net/core/dev.c:5104 [inline] napi_gro_receive+0x44d/0x5a0 net/core/dev.c:5135 receive_buf+0xc64/0x2b90 drivers/net/virtio_net.c:959 virtnet_receive drivers/net/virtio_net.c:1214 [inline] virtnet_poll+0x3c8/0xdb5 drivers/net/virtio_net.c:1296 napi_poll net/core/dev.c:5746 [inline] net_rx_action+0x7b7/0x1930 net/core/dev.c:5812 __do_softirq+0x2e0/0xaf5 kernel/softirq.c:285 invoke_softirq kernel/softirq.c:365 [inline] irq_exit+0x1d1/0x200 kernel/softirq.c:405 exiting_irq arch/x86/include/asm/apic.h:525 [inline] do_IRQ+0xf1/0x190 arch/x86/kernel/irq.c:257 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:kmem_cache_free+0xb3/0x2d0 mm/slab.c:3757 RSP: 0018:ffff8801c5e87bf8 EFLAGS: 00000286 ORIG_RAX: ffffffffffffffd9 RAX: 0000000000000007 RBX: ffff8801b742e480 RCX: 1ffff100339b31d0 RDX: 0000000000000000 RSI: ffff88019cd98e60 RDI: 0000000000000286 RBP: ffff8801c5e87c18 R08: ffff88019cd98e38 R09: 0000000000000006 R10: ffff88019cd98600 R11: 0000000000000000 R12: ffff8801da988dc0 R13: 0000000000000286 R14: ffffffff81c46dd2 R15: 0000000000000000 putname+0xf2/0x130 fs/namei.c:261 filename_create+0x2aa/0x5a0 fs/namei.c:3629 user_path_create fs/namei.c:3664 [inline] do_symlinkat+0xf6/0x2b0 fs/namei.c:4117 __do_sys_symlink fs/namei.c:4143 [inline] __se_sys_symlink fs/namei.c:4141 [inline] __x64_sys_symlink+0x59/0x80 fs/namei.c:4141 do_syscall_64+0x1b1/0x800 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x4556a7 RSP: 002b:0000000000a3eab8 EFLAGS: 00000246 ORIG_RAX: 0000000000000058 RAX: ffffffffffffffda RBX: 0000000000000074 RCX: 00000000004556a7 RDX: 0000000000000000 RSI: 00000000004badf3 RDI: 0000000000a3f7f0 RBP: 0000000000000013 R08: 0000000000000000 R09: 0000000000c35940 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000013 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000001380 random: crng init done netlink: 60 bytes leftover after parsing attributes in process `syz-executor3'. netlink: 60 bytes leftover after parsing attributes in process `syz-executor3'. IPVS: ftp: loaded support on port[0] = 21 IPVS: ftp: loaded support on port[0] = 21 IPVS: ftp: loaded support on port[0] = 21 tc_dump_action: action bad kind tc_dump_action: action bad kind tc_dump_action: action bad kind IPVS: ftp: loaded support on port[0] = 21 tc_dump_action: action bad kind tc_dump_action: action bad kind tc_dump_action: action bad kind tc_dump_action: action bad kind tc_dump_action: action bad kind IPVS: set_ctl: invalid protocol: 0 172.20.20.170:20001 rr IPVS: set_ctl: invalid protocol: 0 172.20.20.170:20001 rr IPVS: set_ctl: invalid protocol: 0 172.20.20.170:20001 rr IPVS: set_ctl: invalid protocol: 0 172.20.20.170:20001 rr IPVS: set_ctl: invalid protocol: 0 172.20.20.170:20001 rr IPVS: set_ctl: invalid protocol: 0 172.20.20.170:20001 rr IPVS: set_ctl: invalid protocol: 0 172.20.20.170:20001 rr IPVS: set_ctl: invalid protocol: 0 172.20.20.170:20001 rr IPVS: set_ctl: invalid protocol: 0 172.20.20.170:20001 rr IPVS: set_ctl: invalid protocol: 0 172.20.20.170:20001 rr IPVS: set_ctl: invalid protocol: 0 172.20.20.170:20001 rr netlink: 3 bytes leftover after parsing attributes in process `syz-executor6'. netlink: 'syz-executor6': attribute type 4 has an invalid length. netlink: 3 bytes leftover after parsing attributes in process `syz-executor6'.