================================ WARNING: inconsistent lock state 4.19.180-syzkaller #0 Not tainted input: syz0 as /devices/virtual/input/input17 -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. systemd-udevd/24017 [HC1[1]:SC0[0]:HE0:SE1] takes: 000000001e0e5105 (hugetlb_lock){?.+.}, at: spin_lock include/linux/spinlock.h:329 [inline] 000000001e0e5105 (hugetlb_lock){?.+.}, at: free_huge_page+0x482/0xd20 mm/hugetlb.c:1294 {HARDIRQ-ON-W} state was registered at: __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:329 [inline] hugetlb_overcommit_handler+0x2d4/0x460 mm/hugetlb.c:3041 proc_sys_call_handler.isra.0+0x1f3/0x3b0 fs/proc/proc_sysctl.c:597 __vfs_write+0xf7/0x770 fs/read_write.c:485 vfs_write+0x1f3/0x540 fs/read_write.c:549 ksys_write+0x12b/0x2a0 fs/read_write.c:599 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe irq event stamp: 2664 hardirqs last enabled at (2663): [] trace_hardirqs_on_thunk+0x1a/0x1c hardirqs last disabled at (2664): [] trace_hardirqs_off_thunk+0x1a/0x1c softirqs last enabled at (2630): [] spin_unlock_bh include/linux/spinlock.h:374 [inline] softirqs last enabled at (2630): [] peernet2id+0x8f/0xc0 net/core/net_namespace.c:266 softirqs last disabled at (2628): [] spin_lock_bh include/linux/spinlock.h:334 [inline] softirqs last disabled at (2628): [] peernet2id+0x6f/0xc0 net/core/net_namespace.c:264 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(hugetlb_lock); lock(hugetlb_lock); *** DEADLOCK *** 1 lock held by systemd-udevd/24017: #0: 00000000737db16f (&(&virtscsi_vq->vq_lock)->rlock){-.-.}, at: virtscsi_vq_done drivers/scsi/virtio_scsi.c:219 [inline] #0: 00000000737db16f (&(&virtscsi_vq->vq_lock)->rlock){-.-.}, at: virtscsi_req_done+0x123/0x210 drivers/scsi/virtio_scsi.c:238 stack backtrace: CPU: 0 PID: 24017 Comm: systemd-udevd Not tainted 4.19.180-syzkaller #0 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+0x1fc/0x2ef lib/dump_stack.c:118 print_usage_bug.cold+0x42e/0x570 kernel/locking/lockdep.c:2544 valid_state kernel/locking/lockdep.c:2557 [inline] mark_lock_irq kernel/locking/lockdep.c:2751 [inline] mark_lock+0xc70/0x1160 kernel/locking/lockdep.c:3131 mark_irqflags kernel/locking/lockdep.c:3006 [inline] __lock_acquire+0x1077/0x3ff0 kernel/locking/lockdep.c:3372 lock_acquire+0x170/0x3c0 kernel/locking/lockdep.c:3907 __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:329 [inline] free_huge_page+0x482/0xd20 mm/hugetlb.c:1294 __put_page+0xe2/0x3a0 mm/swap.c:112 put_page include/linux/mm.h:963 [inline] bio_release_pages+0x1cf/0x320 block/bio.c:1607 bio_check_pages_dirty+0x272/0x410 block/bio.c:1659 dio_bio_complete+0x567/0x710 fs/direct-io.c:552 dio_bio_end_aio+0x42/0x490 fs/direct-io.c:357 bio_endio+0x471/0x810 block/bio.c:1780 req_bio_endio block/blk-core.c:278 [inline] blk_update_request+0x30f/0xaf0 block/blk-core.c:3112 scsi_end_request+0x7d/0xb60 drivers/scsi/scsi_lib.c:673 scsi_io_completion+0x279/0x17c0 drivers/scsi/scsi_lib.c:1102 scsi_softirq_done+0x336/0x3d0 drivers/scsi/scsi_lib.c:1758 __blk_mq_complete_request block/blk-mq.c:583 [inline] blk_mq_complete_request+0x472/0x660 block/blk-mq.c:620 virtscsi_vq_done drivers/scsi/virtio_scsi.c:223 [inline] virtscsi_req_done+0x14b/0x210 drivers/scsi/virtio_scsi.c:238 vring_interrupt+0x12f/0x220 drivers/virtio/virtio_ring.c:953 __handle_irq_event_percpu+0x27e/0x8e0 kernel/irq/handle.c:149 handle_irq_event_percpu kernel/irq/handle.c:189 [inline] handle_irq_event+0x102/0x290 kernel/irq/handle.c:206 handle_edge_irq+0x260/0xcf0 kernel/irq/chip.c:797 generic_handle_irq_desc include/linux/irqdesc.h:155 [inline] handle_irq+0x35/0x50 arch/x86/kernel/irq_64.c:87 do_IRQ+0x93/0x1c0 arch/x86/kernel/irq.c:246 common_interrupt+0xf/0xf arch/x86/entry/entry_64.S:670 RIP: 0033:0x7f8949e30854 Code: e4 0f 84 6f 03 00 00 48 8b 47 58 4e 8d 34 2e 48 39 c6 0f 84 4c 0b 00 00 c7 44 24 20 00 00 00 00 f6 45 04 02 0f 84 7c 07 00 00 <49> 8b 46 08 a8 01 0f 84 90 07 00 00 49 89 c7 49 83 e7 f8 48 83 f8 RSP: 002b:00007ffcb6c31e50 EFLAGS: 00000287 ORIG_RAX: ffffffffffffffda RAX: 0000556a256dd000 RBX: 0000556a255ea020 RCX: 0000000000000000 RDX: 0000000000020de0 RSI: 0000000000000001 RDI: 00007f894a152b00 RBP: 00007f894a152b00 R08: 0000556a255e9810 R09: 0000000000000000 R10: 0000000000000004 R11: 0000000000000246 R12: 0000000000000000 R13: 00000000000000e0 R14: 0000556a255ea100 R15: 000000000000000e input: syz0 as /devices/virtual/input/input18 device wlan1 entered promiscuous mode IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready device wlan1 left promiscuous mode device wlan1 entered promiscuous mode IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 1 CPU: 0 PID: 24115 Comm: syz-executor.4 Not tainted 4.19.180-syzkaller #0 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+0x1fc/0x2ef lib/dump_stack.c:118 fail_dump lib/fault-inject.c:51 [inline] should_fail.cold+0xa/0xf lib/fault-inject.c:149 __should_failslab+0x115/0x180 mm/failslab.c:32 should_failslab+0x5/0x10 mm/slab_common.c:1588 slab_pre_alloc_hook mm/slab.h:424 [inline] slab_alloc_node mm/slab.c:3304 [inline] kmem_cache_alloc_node_trace+0x244/0x3b0 mm/slab.c:3666 kmalloc_node include/linux/slab.h:553 [inline] kzalloc_node include/linux/slab.h:720 [inline] __get_vm_area_node+0x128/0x3a0 mm/vmalloc.c:1394 __vmalloc_node_range mm/vmalloc.c:1748 [inline] __vmalloc_node mm/vmalloc.c:1804 [inline] __vmalloc_node_flags mm/vmalloc.c:1818 [inline] vmalloc+0xe6/0x1a0 mm/vmalloc.c:1840 xt_copy_counters_from_user+0x1d7/0x300 net/netfilter/x_tables.c:1097 do_add_counters+0x9c/0x550 net/ipv6/netfilter/ip6_tables.c:1187 do_arpt_set_ctl+0x17b/0x430 net/ipv4/netfilter/arp_tables.c:1465 nf_sockopt net/netfilter/nf_sockopt.c:106 [inline] nf_setsockopt+0x6f/0xc0 net/netfilter/nf_sockopt.c:115 ip_setsockopt net/ipv4/ip_sockglue.c:1258 [inline] ip_setsockopt+0xd8/0xf0 net/ipv4/ip_sockglue.c:1238 raw_setsockopt+0xd8/0x100 net/ipv4/raw.c:861 __sys_setsockopt+0x14d/0x240 net/socket.c:1901 __do_sys_setsockopt net/socket.c:1912 [inline] __se_sys_setsockopt net/socket.c:1909 [inline] __x64_sys_setsockopt+0xba/0x150 net/socket.c:1909 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x465f69 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fd33d117188 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 000000000056bf60 RCX: 0000000000465f69 RDX: 0000000000000061 RSI: 0000000000000000 RDI: 0000000000000003 RBP: 00007fd33d1171d0 R08: 0000000000000068 R09: 0000000000000000 R10: 0000000020000240 R11: 0000000000000246 R12: 0000000000000001 R13: 00007ffe98ce60bf R14: 00007fd33d117300 R15: 0000000000022000 FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 1 CPU: 0 PID: 24119 Comm: syz-executor.2 Not tainted 4.19.180-syzkaller #0 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+0x1fc/0x2ef lib/dump_stack.c:118 fail_dump lib/fault-inject.c:51 [inline] should_fail.cold+0xa/0xf lib/fault-inject.c:149 __should_failslab+0x115/0x180 mm/failslab.c:32 should_failslab+0x5/0x10 mm/slab_common.c:1588 slab_pre_alloc_hook mm/slab.h:424 [inline] slab_alloc mm/slab.c:3383 [inline] __do_kmalloc mm/slab.c:3725 [inline] __kmalloc_track_caller+0x2a6/0x3c0 mm/slab.c:3742 memdup_user+0x22/0xb0 mm/util.c:160 map_update_elem kernel/bpf/syscall.c:792 [inline] __do_sys_bpf kernel/bpf/syscall.c:2409 [inline] __se_sys_bpf+0x1ffd/0x3a20 kernel/bpf/syscall.c:2379 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x465f69 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fc364c84188 EFLAGS: 00000246 ORIG_RAX: 0000000000000141 RAX: ffffffffffffffda RBX: 000000000056bf60 RCX: 0000000000465f69 RDX: 0000000000000020 RSI: 0000000020000300 RDI: 0000000000000002 RBP: 00007fc364c841d0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 R13: 00007ffdfc14ba0f R14: 00007fc364c84300 R15: 0000000000022000 syz-executor.4: vmalloc: allocation failure: 64 bytes, mode:0x6000c0(GFP_KERNEL), nodemask=(null) syz-executor.4 cpuset=/ mems_allowed=0-1 CPU: 1 PID: 24115 Comm: syz-executor.4 Not tainted 4.19.180-syzkaller #0 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+0x1fc/0x2ef lib/dump_stack.c:118 warn_alloc.cold+0x7b/0x18f mm/page_alloc.c:3457 __vmalloc_node_range mm/vmalloc.c:1775 [inline] __vmalloc_node mm/vmalloc.c:1804 [inline] __vmalloc_node_flags mm/vmalloc.c:1818 [inline] vmalloc+0x15c/0x1a0 mm/vmalloc.c:1840 xt_copy_counters_from_user+0x1d7/0x300 net/netfilter/x_tables.c:1097 do_add_counters+0x9c/0x550 net/ipv6/netfilter/ip6_tables.c:1187 do_arpt_set_ctl+0x17b/0x430 net/ipv4/netfilter/arp_tables.c:1465 nf_sockopt net/netfilter/nf_sockopt.c:106 [inline] nf_setsockopt+0x6f/0xc0 net/netfilter/nf_sockopt.c:115 ip_setsockopt net/ipv4/ip_sockglue.c:1258 [inline] ip_setsockopt+0xd8/0xf0 net/ipv4/ip_sockglue.c:1238 raw_setsockopt+0xd8/0x100 net/ipv4/raw.c:861 __sys_setsockopt+0x14d/0x240 net/socket.c:1901 __do_sys_setsockopt net/socket.c:1912 [inline] __se_sys_setsockopt net/socket.c:1909 [inline] __x64_sys_setsockopt+0xba/0x150 net/socket.c:1909 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x465f69 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fd33d117188 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 000000000056bf60 RCX: 0000000000465f69 RDX: 0000000000000061 RSI: 0000000000000000 RDI: 0000000000000003 RBP: 00007fd33d1171d0 R08: 0000000000000068 R09: 0000000000000000 R10: 0000000020000240 R11: 0000000000000246 R12: 0000000000000001 R13: 00007ffe98ce60bf R14: 00007fd33d117300 R15: 0000000000022000 Mem-Info: active_anon:218065 inactive_anon:4754 isolated_anon:0 active_file:10346 inactive_file:92375 isolated_file:0 unevictable:0 dirty:186 writeback:0 unstable:0 slab_reclaimable:15792 slab_unreclaimable:123633 mapped:60245 shmem:4953 pagetables:3168 bounce:0 free:1161767 free_pcp:579 free_cma:0 Node 0 active_anon:872260kB inactive_anon:19016kB active_file:41308kB inactive_file:369500kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:240980kB dirty:744kB writeback:0kB shmem:19812kB shmem_thp: 0kB shmem_pmdmapped: 0kB anon_thp: 860160kB writeback_tmp:0kB unstable:0kB all_unreclaimable? no Node 1 active_anon:0kB inactive_anon:0kB active_file:76kB inactive_file:0kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:0kB dirty:0kB writeback:0kB shmem:0kB shmem_thp: 0kB shmem_pmdmapped: 0kB anon_thp: 0kB writeback_tmp:0kB unstable:0kB all_unreclaimable? no IPVS: ftp: loaded support on port[0] = 21 Node 0 DMA free:15908kB min:204kB low:252kB high:300kB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:15992kB managed:15908kB mlocked:0kB kernel_stack:0kB pagetables:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 0 CPU: 1 PID: 24146 Comm: syz-executor.2 Not tainted 4.19.180-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 lowmem_reserve[]: 0 2693 2695 2695 2695 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2ef lib/dump_stack.c:118 fail_dump lib/fault-inject.c:51 [inline] should_fail.cold+0xa/0xf lib/fault-inject.c:149 __should_failslab+0x115/0x180 mm/failslab.c:32 should_failslab+0x5/0x10 mm/slab_common.c:1588 Node 0 DMA32 free:594080kB min:35996kB low:44992kB high:53988kB active_anon:870272kB inactive_anon:19016kB active_file:41308kB inactive_file:369536kB unevictable:0kB writepending:784kB present:3129332kB managed:2763492kB mlocked:0kB kernel_stack:10816kB pagetables:12920kB bounce:0kB free_pcp:1796kB local_pcp:696kB free_cma:0kB slab_pre_alloc_hook mm/slab.h:424 [inline] slab_alloc mm/slab.c:3383 [inline] __do_kmalloc mm/slab.c:3725 [inline] __kmalloc+0x2ab/0x3c0 mm/slab.c:3736 kmalloc include/linux/slab.h:520 [inline] map_update_elem kernel/bpf/syscall.c:806 [inline] __do_sys_bpf kernel/bpf/syscall.c:2409 [inline] __se_sys_bpf+0x20cc/0x3a20 kernel/bpf/syscall.c:2379 lowmem_reserve[]: 0 0 1 1 1 IPVS: ftp: loaded support on port[0] = 21 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x465f69 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fc364c84188 EFLAGS: 00000246 ORIG_RAX: 0000000000000141 Node 0 Normal free:28kB min:24kB low:28kB high:32kB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:1048576kB managed:2000kB mlocked:0kB kernel_stack:0kB pagetables:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB RAX: ffffffffffffffda RBX: 000000000056bf60 RCX: 0000000000465f69 RDX: 0000000000000020 RSI: 0000000020000300 RDI: 0000000000000002 RBP: 00007fc364c841d0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 R13: 00007ffdfc14ba0f R14: 00007fc364c84300 R15: 0000000000022000 audit: type=1804 audit(1615922967.019:32): pid=24166 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.1" name="/root/syzkaller-testdir326192903/syzkaller.nU0Cmo/740/bus" dev="sda1" ino=17413 res=1 lowmem_reserve[]: 0 0 0 0 0 audit: type=1804 audit(1615922967.119:33): pid=24176 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=ToMToU comm="syz-executor.1" name="/root/syzkaller-testdir326192903/syzkaller.nU0Cmo/740/bus" dev="sda1" ino=17413 res=1 Node 1 Normal free:4038020kB min:53876kB low:67344kB high:80812kB active_anon:0kB inactive_anon:0kB active_file:76kB inactive_file:0kB unevictable:0kB writepending:0kB present:4194304kB managed:4128248kB mlocked:0kB kernel_stack:0kB pagetables:0kB bounce:0kB free_pcp:460kB local_pcp:220kB free_cma:0kB lowmem_reserve[]: 0 0 0 0 0 Node 0 DMA: 1*4kB (U) 0*8kB 0*16kB 1*32kB (U) 2*64kB (U) 1*128kB (U) 1*256kB (U) 0*512kB 1*1024kB (U) 1*2048kB (M) 3*4096kB (M) = 15908kB Node 0 DMA32: 5717*4kB (UME) 1012*8kB (UME) 404*16kB (UME) 1667*32kB (UME) 932*64kB (UME) 397*128kB (UME) 157*256kB (UME) 68*512kB (UME) 57*1024kB (UME) 31*2048kB (U) 48*4096kB (UM) = 594708kB Node 0 Normal: 1*4kB (U) 3*8kB (U) 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 28kB Node 1 Normal: 0*4kB 132*8kB (UE) 295*16kB (UME) 77*32kB (UME) 24*64kB (UM) 16*128kB (UME) 12*256kB (UME) 6*512kB (UM) 3*1024kB (UM) 1*2048kB (U) 980*4096kB (M) = 4037168kB Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=1048576kB Node 0 hugepages_total=2 hugepages_free=2 hugepages_surp=2 hugepages_size=2048kB Node 1 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=1048576kB Node 1 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB 57512 total pagecache pages 0 pages in swap cache Swap cache stats: add 0, delete 0, find 0/0 Free swap = 0kB Total swap = 0kB 2097051 pages RAM 0 pages HighMem/MovableOnly 369639 pages reserved 0 pages cma reserved IPVS: ftp: loaded support on port[0] = 21 netlink: 64 bytes leftover after parsing attributes in process `syz-executor.5'.