====================================================== WARNING: possible circular locking dependency detected 5.13.0-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.5/10182 is trying to acquire lock: ffffffff8aa88040 (fs_reclaim){+.+.}-{0:0}, at: fs_reclaim_acquire+0xf7/0x160 mm/page_alloc.c:4586 but task is already holding lock: ffff8880b9e4d5e0 (lock#2){-.-.}-{2:2}, at: __alloc_pages_bulk+0x4ad/0x1870 mm/page_alloc.c:5291 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (lock#2){-.-.}-{2:2}: local_lock_acquire include/linux/local_lock_internal.h:42 [inline] free_unref_page+0x1bf/0x690 mm/page_alloc.c:3439 mm_free_pgd kernel/fork.c:636 [inline] __mmdrop+0xb9/0x350 kernel/fork.c:687 mmdrop include/linux/sched/mm.h:49 [inline] finish_task_switch.isra.0+0x69f/0xa10 kernel/sched/core.c:4582 context_switch kernel/sched/core.c:4686 [inline] __schedule+0x909/0x26d0 kernel/sched/core.c:5940 preempt_schedule_irq+0x4e/0x90 kernel/sched/core.c:6328 irqentry_exit+0x31/0x80 kernel/entry/common.c:427 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:638 lock_acquire+0x1ef/0x510 kernel/locking/lockdep.c:5593 __fs_reclaim_acquire mm/page_alloc.c:4564 [inline] fs_reclaim_acquire+0x117/0x160 mm/page_alloc.c:4578 might_alloc include/linux/sched/mm.h:198 [inline] slab_pre_alloc_hook mm/slab.h:485 [inline] slab_alloc mm/slab.c:3306 [inline] kmem_cache_alloc+0x3a/0x530 mm/slab.c:3507 kmem_cache_zalloc include/linux/slab.h:711 [inline] lsm_file_alloc security/security.c:571 [inline] security_file_alloc+0x25/0x120 security/security.c:1514 __alloc_file+0xb6/0x240 fs/file_table.c:106 alloc_empty_file+0x3c/0xf0 fs/file_table.c:150 path_openat+0xe0/0x22b0 fs/namei.c:3480 do_filp_open+0x17f/0x3a0 fs/namei.c:3521 do_sys_openat2+0x11e/0x360 fs/open.c:1195 do_sys_open fs/open.c:1211 [inline] __do_sys_open fs/open.c:1219 [inline] __se_sys_open fs/open.c:1215 [inline] __x64_sys_open+0xfd/0x1a0 fs/open.c:1215 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae -> #0 (fs_reclaim){+.+.}-{0:0}: check_prev_add kernel/locking/lockdep.c:3051 [inline] check_prevs_add kernel/locking/lockdep.c:3174 [inline] validate_chain kernel/locking/lockdep.c:3789 [inline] __lock_acquire+0x2985/0x5410 kernel/locking/lockdep.c:5015 lock_acquire kernel/locking/lockdep.c:5625 [inline] lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5590 __fs_reclaim_acquire mm/page_alloc.c:4564 [inline] fs_reclaim_acquire+0x117/0x160 mm/page_alloc.c:4578 prepare_alloc_pages+0x15c/0x580 mm/page_alloc.c:5176 __alloc_pages+0x12f/0x500 mm/page_alloc.c:5375 stack_depot_save+0x39d/0x4e0 lib/stackdepot.c:303 save_stack+0x131/0x1a0 mm/page_owner.c:120 __set_page_owner+0x2e/0x250 mm/page_owner.c:181 prep_new_page mm/page_alloc.c:2445 [inline] __alloc_pages_bulk+0x8b9/0x1870 mm/page_alloc.c:5313 alloc_pages_bulk_array_node include/linux/gfp.h:557 [inline] vm_area_alloc_pages mm/vmalloc.c:2775 [inline] __vmalloc_area_node mm/vmalloc.c:2845 [inline] __vmalloc_node_range+0x2f6/0x7e0 mm/vmalloc.c:2947 __vmalloc_node mm/vmalloc.c:2996 [inline] __vmalloc_area_node mm/vmalloc.c:2828 [inline] __vmalloc_node_range+0x298/0x7e0 mm/vmalloc.c:2947 __vmalloc_node+0x58/0x90 mm/vmalloc.c:2996 hash_ipportnet_create+0x2fc/0xf30 net/netfilter/ipset/ip_set_hash_gen.h:1524 ip_set_create+0x6b2/0x1180 net/netfilter/ipset/ip_set_core.c:1100 nfnetlink_rcv_msg+0x94e/0xf30 net/netfilter/nfnetlink.c:296 netlink_rcv_skb+0x118/0x370 net/netlink/af_netlink.c:2504 nfnetlink_rcv+0x143/0x340 net/netfilter/nfnetlink.c:654 netlink_unicast_kernel net/netlink/af_netlink.c:1314 [inline] netlink_unicast+0x42e/0x700 net/netlink/af_netlink.c:1340 netlink_sendmsg+0x70e/0xbe0 net/netlink/af_netlink.c:1929 sock_sendmsg_nosec net/socket.c:702 [inline] sock_sendmsg+0xab/0xe0 net/socket.c:722 ____sys_sendmsg+0x5bf/0x7a0 net/socket.c:2385 ___sys_sendmsg+0xd3/0x150 net/socket.c:2439 __sys_sendmsg+0xb2/0x140 net/socket.c:2468 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(lock#2); lock(fs_reclaim); lock(lock#2); lock(fs_reclaim); *** DEADLOCK *** 2 locks held by syz-executor.5/10182: #0: ffffffff8f481ad8 (nfnl_subsys_ipset){+.+.}-{3:3}, at: nfnl_lock net/netfilter/nfnetlink.c:93 [inline] #0: ffffffff8f481ad8 (nfnl_subsys_ipset){+.+.}-{3:3}, at: nfnetlink_rcv_msg+0x84f/0xf30 net/netfilter/nfnetlink.c:290 #1: ffff8880b9e4d5e0 (lock#2){-.-.}-{2:2}, at: __alloc_pages_bulk+0x4ad/0x1870 mm/page_alloc.c:5291 stack backtrace: CPU: 0 PID: 10182 Comm: syz-executor.5 Not tainted 5.13.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack_lvl+0x57/0x7d lib/dump_stack.c:96 check_noncircular+0x25f/0x2e0 kernel/locking/lockdep.c:2131 check_prev_add kernel/locking/lockdep.c:3051 [inline] check_prevs_add kernel/locking/lockdep.c:3174 [inline] validate_chain kernel/locking/lockdep.c:3789 [inline] __lock_acquire+0x2985/0x5410 kernel/locking/lockdep.c:5015 lock_acquire kernel/locking/lockdep.c:5625 [inline] lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5590 __fs_reclaim_acquire mm/page_alloc.c:4564 [inline] fs_reclaim_acquire+0x117/0x160 mm/page_alloc.c:4578 prepare_alloc_pages+0x15c/0x580 mm/page_alloc.c:5176 __alloc_pages+0x12f/0x500 mm/page_alloc.c:5375 stack_depot_save+0x39d/0x4e0 lib/stackdepot.c:303 save_stack+0x131/0x1a0 mm/page_owner.c:120 __set_page_owner+0x2e/0x250 mm/page_owner.c:181 prep_new_page mm/page_alloc.c:2445 [inline] __alloc_pages_bulk+0x8b9/0x1870 mm/page_alloc.c:5313 alloc_pages_bulk_array_node include/linux/gfp.h:557 [inline] vm_area_alloc_pages mm/vmalloc.c:2775 [inline] __vmalloc_area_node mm/vmalloc.c:2845 [inline] __vmalloc_node_range+0x2f6/0x7e0 mm/vmalloc.c:2947 __vmalloc_node mm/vmalloc.c:2996 [inline] __vmalloc_area_node mm/vmalloc.c:2828 [inline] __vmalloc_node_range+0x298/0x7e0 mm/vmalloc.c:2947 __vmalloc_node+0x58/0x90 mm/vmalloc.c:2996 hash_ipportnet_create+0x2fc/0xf30 net/netfilter/ipset/ip_set_hash_gen.h:1524 ip_set_create+0x6b2/0x1180 net/netfilter/ipset/ip_set_core.c:1100 nfnetlink_rcv_msg+0x94e/0xf30 net/netfilter/nfnetlink.c:296 netlink_rcv_skb+0x118/0x370 net/netlink/af_netlink.c:2504 nfnetlink_rcv+0x143/0x340 net/netfilter/nfnetlink.c:654 netlink_unicast_kernel net/netlink/af_netlink.c:1314 [inline] netlink_unicast+0x42e/0x700 net/netlink/af_netlink.c:1340 netlink_sendmsg+0x70e/0xbe0 net/netlink/af_netlink.c:1929 sock_sendmsg_nosec net/socket.c:702 [inline] sock_sendmsg+0xab/0xe0 net/socket.c:722 ____sys_sendmsg+0x5bf/0x7a0 net/socket.c:2385 ___sys_sendmsg+0xd3/0x150 net/socket.c:2439 __sys_sendmsg+0xb2/0x140 net/socket.c:2468 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x4665f9 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:00007ff053c19188 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 000000000056bf80 RCX: 00000000004665f9 RDX: 0000000000000000 RSI: 00000000200000c0 RDI: 0000000000000003 RBP: 00000000004bfcc4 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf80 R13: 00007ffcf12d3d1f R14: 00007ff053c19300 R15: 0000000000022000 BUG: sleeping function called from invalid context at mm/page_alloc.c:5179 in_atomic(): 0, irqs_disabled(): 1, non_block: 0, pid: 10182, name: syz-executor.5 INFO: lockdep is turned off. irq event stamp: 271694 hardirqs last enabled at (271693): [] __alloc_pages_bulk+0x1021/0x1870 mm/page_alloc.c:5321 hardirqs last disabled at (271694): [] __alloc_pages_bulk+0x1017/0x1870 mm/page_alloc.c:5291 softirqs last enabled at (271140): [] invoke_softirq kernel/softirq.c:432 [inline] softirqs last enabled at (271140): [] __irq_exit_rcu+0x16e/0x1c0 kernel/softirq.c:636 softirqs last disabled at (271115): [] invoke_softirq kernel/softirq.c:432 [inline] softirqs last disabled at (271115): [] __irq_exit_rcu+0x16e/0x1c0 kernel/softirq.c:636 CPU: 0 PID: 10182 Comm: syz-executor.5 Not tainted 5.13.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack_lvl+0x57/0x7d lib/dump_stack.c:96 ___might_sleep.cold+0x1f1/0x237 kernel/sched/core.c:9153 prepare_alloc_pages+0x3da/0x580 mm/page_alloc.c:5179 __alloc_pages+0x12f/0x500 mm/page_alloc.c:5375 stack_depot_save+0x39d/0x4e0 lib/stackdepot.c:303 save_stack+0x131/0x1a0 mm/page_owner.c:120 __set_page_owner+0x2e/0x250 mm/page_owner.c:181 prep_new_page mm/page_alloc.c:2445 [inline] __alloc_pages_bulk+0x8b9/0x1870 mm/page_alloc.c:5313 alloc_pages_bulk_array_node include/linux/gfp.h:557 [inline] vm_area_alloc_pages mm/vmalloc.c:2775 [inline] __vmalloc_area_node mm/vmalloc.c:2845 [inline] __vmalloc_node_range+0x2f6/0x7e0 mm/vmalloc.c:2947 __vmalloc_node mm/vmalloc.c:2996 [inline] __vmalloc_area_node mm/vmalloc.c:2828 [inline] __vmalloc_node_range+0x298/0x7e0 mm/vmalloc.c:2947 __vmalloc_node+0x58/0x90 mm/vmalloc.c:2996 hash_ipportnet_create+0x2fc/0xf30 net/netfilter/ipset/ip_set_hash_gen.h:1524 ip_set_create+0x6b2/0x1180 net/netfilter/ipset/ip_set_core.c:1100 nfnetlink_rcv_msg+0x94e/0xf30 net/netfilter/nfnetlink.c:296 netlink_rcv_skb+0x118/0x370 net/netlink/af_netlink.c:2504 nfnetlink_rcv+0x143/0x340 net/netfilter/nfnetlink.c:654 netlink_unicast_kernel net/netlink/af_netlink.c:1314 [inline] netlink_unicast+0x42e/0x700 net/netlink/af_netlink.c:1340 netlink_sendmsg+0x70e/0xbe0 net/netlink/af_netlink.c:1929 sock_sendmsg_nosec net/socket.c:702 [inline] sock_sendmsg+0xab/0xe0 net/socket.c:722 ____sys_sendmsg+0x5bf/0x7a0 net/socket.c:2385 ___sys_sendmsg+0xd3/0x150 net/socket.c:2439 __sys_sendmsg+0xb2/0x140 net/socket.c:2468 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x4665f9 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:00007ff053c19188 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 000000000056bf80 RCX: 00000000004665f9 RDX: 0000000000000000 RSI: 00000000200000c0 RDI: 0000000000000003 RBP: 00000000004bfcc4 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf80 R13: 00007ffcf12d3d1f R14: 00007ff053c19300 R15: 0000000000022000