====================================================== WARNING: possible circular locking dependency detected 5.14.0-rc1-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.4/11404 is trying to acquire lock: ffffffff8ba9afc0 (fs_reclaim){+.+.}-{0:0}, at: fs_reclaim_acquire+0xf7/0x160 mm/page_alloc.c:4574 but task is already holding lock: ffff8880b9d4d580 (lock#2){-.-.}-{2:2}, at: __alloc_pages_bulk+0x4ad/0x1870 mm/page_alloc.c:5279 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (lock#2){-.-.}-{2:2}: local_lock_acquire include/linux/local_lock_internal.h:42 [inline] rmqueue_pcplist mm/page_alloc.c:3663 [inline] rmqueue mm/page_alloc.c:3701 [inline] get_page_from_freelist+0x4aa/0x2f80 mm/page_alloc.c:4163 __alloc_pages+0x1b2/0x500 mm/page_alloc.c:5374 alloc_pages+0x18c/0x2a0 mm/mempolicy.c:2244 stack_depot_save+0x39d/0x4e0 lib/stackdepot.c:303 kasan_save_stack+0x32/0x40 mm/kasan/common.c:40 kasan_record_aux_stack+0xe5/0x110 mm/kasan/generic.c:348 insert_work+0x48/0x370 kernel/workqueue.c:1332 __queue_work+0x5c1/0xed0 kernel/workqueue.c:1498 queue_work_on+0xee/0x110 kernel/workqueue.c:1525 queue_work include/linux/workqueue.h:507 [inline] schedule_work include/linux/workqueue.h:568 [inline] __rhashtable_insert_fast include/linux/rhashtable.h:791 [inline] rhashtable_lookup_insert_fast include/linux/rhashtable.h:905 [inline] fdb_create+0xcd1/0x1460 net/bridge/br_fdb.c:521 fdb_insert+0x15b/0x1c0 net/bridge/br_fdb.c:553 br_fdb_insert+0x35/0x50 net/bridge/br_fdb.c:570 __vlan_add+0x10ac/0x2a30 net/bridge/br_vlan.c:291 nbp_vlan_add+0x203/0x3d0 net/bridge/br_vlan.c:1236 nbp_vlan_init+0x376/0x500 net/bridge/br_vlan.c:1182 br_add_if+0x10f4/0x1dc0 net/bridge/br_if.c:690 do_set_master+0x1c8/0x220 net/core/rtnetlink.c:2517 do_setlink+0x990/0x3900 net/core/rtnetlink.c:2721 __rtnl_newlink+0xddb/0x1760 net/core/rtnetlink.c:3386 rtnl_newlink+0x64/0xa0 net/core/rtnetlink.c:3501 rtnetlink_rcv_msg+0x413/0xb80 net/core/rtnetlink.c:5567 netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2504 netlink_unicast_kernel net/netlink/af_netlink.c:1314 [inline] netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1340 netlink_sendmsg+0x86d/0xdb0 net/netlink/af_netlink.c:1929 sock_sendmsg_nosec net/socket.c:703 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:723 __sys_sendto+0x21c/0x320 net/socket.c:2019 __do_sys_sendto net/socket.c:2031 [inline] __se_sys_sendto net/socket.c:2027 [inline] __x64_sys_sendto+0xdd/0x1b0 net/socket.c:2027 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 -> #1 (&pool->lock){-.-.}-{2:2}: __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:151 __queue_work+0x366/0xed0 kernel/workqueue.c:1455 queue_work_on+0xee/0x110 kernel/workqueue.c:1525 queue_work include/linux/workqueue.h:507 [inline] schedule_work include/linux/workqueue.h:568 [inline] __vfree_deferred mm/vmalloc.c:2609 [inline] vfree_atomic+0xac/0xe0 mm/vmalloc.c:2627 free_thread_stack kernel/fork.c:292 [inline] release_task_stack kernel/fork.c:432 [inline] put_task_stack+0x2e0/0x4e0 kernel/fork.c:443 finish_task_switch.isra.0+0x77f/0xa50 kernel/sched/core.c:4595 context_switch kernel/sched/core.c:4686 [inline] __schedule+0x942/0x26f0 kernel/sched/core.c:5940 preempt_schedule_notrace+0x5b/0xd0 kernel/sched/core.c:6179 preempt_schedule_notrace_thunk+0x16/0x18 arch/x86/entry/thunk_64.S:36 rcu_read_unlock_sched_notrace include/linux/rcupdate.h:809 [inline] trace_lock_release include/trace/events/lock.h:58 [inline] lock_release+0x538/0x720 kernel/locking/lockdep.c:5636 might_alloc include/linux/sched/mm.h:199 [inline] slab_pre_alloc_hook mm/slab.h:485 [inline] slab_alloc_node mm/slub.c:2902 [inline] slab_alloc mm/slub.c:2989 [inline] __kmalloc+0x5f/0x330 mm/slub.c:4133 kmalloc include/linux/slab.h:596 [inline] kzalloc include/linux/slab.h:721 [inline] lsm_cred_alloc security/security.c:536 [inline] security_prepare_creds+0x10e/0x190 security/security.c:1690 prepare_kernel_cred+0x469/0x8a0 kernel/cred.c:756 call_usermodehelper_exec_async+0x10e/0x580 kernel/umh.c:91 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 -> #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+0x2a07/0x54a0 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:4552 [inline] fs_reclaim_acquire+0x117/0x160 mm/page_alloc.c:4566 prepare_alloc_pages+0x15c/0x580 mm/page_alloc.c:5164 __alloc_pages+0x12f/0x500 mm/page_alloc.c:5363 alloc_pages+0x18c/0x2a0 mm/mempolicy.c:2244 stack_depot_save+0x39d/0x4e0 lib/stackdepot.c:303 save_stack+0x15e/0x1e0 mm/page_owner.c:120 __set_page_owner+0x50/0x290 mm/page_owner.c:181 prep_new_page mm/page_alloc.c:2433 [inline] __alloc_pages_bulk+0x8b9/0x1870 mm/page_alloc.c:5301 alloc_pages_bulk_array_node include/linux/gfp.h:557 [inline] vm_area_alloc_pages mm/vmalloc.c:2793 [inline] __vmalloc_area_node mm/vmalloc.c:2863 [inline] __vmalloc_node_range+0x39d/0x960 mm/vmalloc.c:2966 __vmalloc_node mm/vmalloc.c:3015 [inline] __vmalloc+0x69/0x80 mm/vmalloc.c:3029 pcpu_mem_zalloc mm/percpu.c:517 [inline] pcpu_mem_zalloc+0x51/0xa0 mm/percpu.c:509 pcpu_alloc_chunk mm/percpu.c:1465 [inline] pcpu_create_chunk+0x18a/0x720 mm/percpu-vm.c:338 pcpu_alloc+0xfa1/0x1350 mm/percpu.c:1838 bpf_map_alloc_percpu+0x84/0x1a0 kernel/bpf/syscall.c:440 bpf_array_alloc_percpu kernel/bpf/arraymap.c:37 [inline] array_map_alloc+0x52e/0x710 kernel/bpf/arraymap.c:150 find_and_alloc_map kernel/bpf/syscall.c:127 [inline] map_create kernel/bpf/syscall.c:844 [inline] __sys_bpf+0xbc3/0x5410 kernel/bpf/syscall.c:4484 __do_sys_bpf kernel/bpf/syscall.c:4606 [inline] __se_sys_bpf kernel/bpf/syscall.c:4604 [inline] __x64_sys_bpf+0x75/0xb0 kernel/bpf/syscall.c:4604 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: Chain exists of: fs_reclaim --> &pool->lock --> lock#2 Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(lock#2); lock(&pool->lock); lock(lock#2); lock(fs_reclaim); *** DEADLOCK *** 2 locks held by syz-executor.4/11404: #0: ffffffff8ba7ba08 (pcpu_alloc_mutex){+.+.}-{3:3}, at: pcpu_alloc+0xb12/0x1350 mm/percpu.c:1778 #1: ffff8880b9d4d580 (lock#2){-.-.}-{2:2}, at: __alloc_pages_bulk+0x4ad/0x1870 mm/page_alloc.c:5279 stack backtrace: CPU: 1 PID: 11404 Comm: syz-executor.4 Not tainted 5.14.0-rc1-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:105 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+0x2a07/0x54a0 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:4552 [inline] fs_reclaim_acquire+0x117/0x160 mm/page_alloc.c:4566 prepare_alloc_pages+0x15c/0x580 mm/page_alloc.c:5164 __alloc_pages+0x12f/0x500 mm/page_alloc.c:5363 alloc_pages+0x18c/0x2a0 mm/mempolicy.c:2244 stack_depot_save+0x39d/0x4e0 lib/stackdepot.c:303 save_stack+0x15e/0x1e0 mm/page_owner.c:120 __set_page_owner+0x50/0x290 mm/page_owner.c:181 prep_new_page mm/page_alloc.c:2433 [inline] __alloc_pages_bulk+0x8b9/0x1870 mm/page_alloc.c:5301 alloc_pages_bulk_array_node include/linux/gfp.h:557 [inline] vm_area_alloc_pages mm/vmalloc.c:2793 [inline] __vmalloc_area_node mm/vmalloc.c:2863 [inline] __vmalloc_node_range+0x39d/0x960 mm/vmalloc.c:2966 __vmalloc_node mm/vmalloc.c:3015 [inline] __vmalloc+0x69/0x80 mm/vmalloc.c:3029 pcpu_mem_zalloc mm/percpu.c:517 [inline] pcpu_mem_zalloc+0x51/0xa0 mm/percpu.c:509 pcpu_alloc_chunk mm/percpu.c:1465 [inline] pcpu_create_chunk+0x18a/0x720 mm/percpu-vm.c:338 pcpu_alloc+0xfa1/0x1350 mm/percpu.c:1838 bpf_map_alloc_percpu+0x84/0x1a0 kernel/bpf/syscall.c:440 bpf_array_alloc_percpu kernel/bpf/arraymap.c:37 [inline] array_map_alloc+0x52e/0x710 kernel/bpf/arraymap.c:150 find_and_alloc_map kernel/bpf/syscall.c:127 [inline] map_create kernel/bpf/syscall.c:844 [inline] __sys_bpf+0xbc3/0x5410 kernel/bpf/syscall.c:4484 __do_sys_bpf kernel/bpf/syscall.c:4606 [inline] __se_sys_bpf kernel/bpf/syscall.c:4604 [inline] __x64_sys_bpf+0x75/0xb0 kernel/bpf/syscall.c:4604 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:0x4665e9 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:00007f3ca6262188 EFLAGS: 00000246 ORIG_RAX: 0000000000000141 RAX: ffffffffffffffda RBX: 000000000056bf80 RCX: 00000000004665e9 RDX: 0000000000000040 RSI: 0000000020000000 RDI: 0d00000000000000 RBP: 00000000004bfcc4 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf80 R13: 00007ffc22aad5ef R14: 00007f3ca6262300 R15: 0000000000022000 BUG: sleeping function called from invalid context at mm/page_alloc.c:5167 in_atomic(): 0, irqs_disabled(): 1, non_block: 0, pid: 11404, name: syz-executor.4 INFO: lockdep is turned off. irq event stamp: 8358 hardirqs last enabled at (8357): [] asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:638 hardirqs last disabled at (8358): [] __alloc_pages_bulk+0x1017/0x1870 mm/page_alloc.c:5279 softirqs last enabled at (8280): [] invoke_softirq kernel/softirq.c:432 [inline] softirqs last enabled at (8280): [] __irq_exit_rcu+0x16e/0x1c0 kernel/softirq.c:636 softirqs last disabled at (8221): [] invoke_softirq kernel/softirq.c:432 [inline] softirqs last disabled at (8221): [] __irq_exit_rcu+0x16e/0x1c0 kernel/softirq.c:636 CPU: 1 PID: 11404 Comm: syz-executor.4 Not tainted 5.14.0-rc1-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:105 ___might_sleep.cold+0x1f1/0x237 kernel/sched/core.c:9154 prepare_alloc_pages+0x3da/0x580 mm/page_alloc.c:5167 __alloc_pages+0x12f/0x500 mm/page_alloc.c:5363 alloc_pages+0x18c/0x2a0 mm/mempolicy.c:2244 stack_depot_save+0x39d/0x4e0 lib/stackdepot.c:303 save_stack+0x15e/0x1e0 mm/page_owner.c:120 __set_page_owner+0x50/0x290 mm/page_owner.c:181 prep_new_page mm/page_alloc.c:2433 [inline] __alloc_pages_bulk+0x8b9/0x1870 mm/page_alloc.c:5301 alloc_pages_bulk_array_node include/linux/gfp.h:557 [inline] vm_area_alloc_pages mm/vmalloc.c:2793 [inline] __vmalloc_area_node mm/vmalloc.c:2863 [inline] __vmalloc_node_range+0x39d/0x960 mm/vmalloc.c:2966 __vmalloc_node mm/vmalloc.c:3015 [inline] __vmalloc+0x69/0x80 mm/vmalloc.c:3029 pcpu_mem_zalloc mm/percpu.c:517 [inline] pcpu_mem_zalloc+0x51/0xa0 mm/percpu.c:509 pcpu_alloc_chunk mm/percpu.c:1465 [inline] pcpu_create_chunk+0x18a/0x720 mm/percpu-vm.c:338 pcpu_alloc+0xfa1/0x1350 mm/percpu.c:1838 bpf_map_alloc_percpu+0x84/0x1a0 kernel/bpf/syscall.c:440 bpf_array_alloc_percpu kernel/bpf/arraymap.c:37 [inline] array_map_alloc+0x52e/0x710 kernel/bpf/arraymap.c:150 find_and_alloc_map kernel/bpf/syscall.c:127 [inline] map_create kernel/bpf/syscall.c:844 [inline] __sys_bpf+0xbc3/0x5410 kernel/bpf/syscall.c:4484 __do_sys_bpf kernel/bpf/syscall.c:4606 [inline] __se_sys_bpf kernel/bpf/syscall.c:4604 [inline] __x64_sys_bpf+0x75/0xb0 kernel/bpf/syscall.c:4604 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:0x4665e9 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:00007f3ca6262188 EFLAGS: 00000246 ORIG_RAX: 0000000000000141 RAX: ffffffffffffffda RBX: 000000000056bf80 RCX: 00000000004665e9 RDX: 0000000000000040 RSI: 0000000020000000 RDI: 0d00000000000000 RBP: 00000000004bfcc4 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf80 R13: 00007ffc22aad5ef R14: 00007f3ca6262300 R15: 0000000000022000