====================================================== WARNING: possible circular locking dependency detected 5.13.0-syzkaller #0 Not tainted ------------------------------------------------------ syz-fuzzer/8464 is trying to acquire lock: ffffffff8ba9c1c0 (fs_reclaim){+.+.}-{0:0}, at: fs_reclaim_acquire+0xf7/0x160 mm/page_alloc.c:4586 but task is already holding lock: ffff8880b9d4d620 (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+0xcb/0x3f0 kernel/fork.c:687 mmdrop include/linux/sched/mm.h:49 [inline] finish_task_switch.isra.0+0x6da/0xa50 kernel/sched/core.c:4582 context_switch kernel/sched/core.c:4686 [inline] __schedule+0x93c/0x2710 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 memory_is_poisoned_n mm/kasan/generic.c:135 [inline] memory_is_poisoned mm/kasan/generic.c:159 [inline] check_region_inline mm/kasan/generic.c:180 [inline] kasan_check_range+0x12b/0x180 mm/kasan/generic.c:189 instrument_atomic_read include/linux/instrumented.h:71 [inline] test_bit include/asm-generic/bitops/instrumented-non-atomic.h:134 [inline] cpumask_test_cpu include/linux/cpumask.h:344 [inline] cpu_online include/linux/cpumask.h:895 [inline] trace_lock_release include/trace/events/lock.h:58 [inline] lock_release+0xa1/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:2891 [inline] slab_alloc mm/slub.c:2978 [inline] __kmalloc+0x5f/0x330 mm/slub.c:4106 kmalloc include/linux/slab.h:596 [inline] load_elf_binary+0x3b2/0x4b40 fs/binfmt_elf.c:885 search_binary_handler fs/exec.c:1724 [inline] exec_binprm fs/exec.c:1765 [inline] bprm_execve fs/exec.c:1834 [inline] bprm_execve+0x821/0x19a0 fs/exec.c:1796 do_execveat_common+0x5eb/0x770 fs/exec.c:1923 do_execve fs/exec.c:1991 [inline] __do_sys_execve fs/exec.c:2067 [inline] __se_sys_execve fs/exec.c:2062 [inline] __x64_sys_execve+0x8f/0xc0 fs/exec.c:2062 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+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: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 alloc_pages+0x18c/0x2a0 mm/mempolicy.c:2272 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: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+0x39d/0x960 mm/vmalloc.c:2947 __vmalloc_node mm/vmalloc.c:2996 [inline] __vmalloc+0x69/0x80 mm/vmalloc.c:3010 snd_dma_alloc_pages+0x433/0x590 sound/core/memalloc.c:150 do_alloc_pages+0x9b/0x160 sound/core/pcm_memory.c:43 snd_pcm_lib_malloc_pages+0x3f6/0x880 sound/core/pcm_memory.c:404 snd_pcm_hw_params+0x1408/0x1990 sound/core/pcm_native.c:705 snd_pcm_kernel_ioctl+0xd1/0x240 sound/core/pcm_native.c:3332 snd_pcm_oss_change_params_locked+0x1958/0x3990 sound/core/oss/pcm_oss.c:947 snd_pcm_oss_change_params sound/core/oss/pcm_oss.c:1090 [inline] snd_pcm_oss_make_ready+0xe7/0x1b0 sound/core/oss/pcm_oss.c:1149 snd_pcm_oss_sync+0x1de/0x800 sound/core/oss/pcm_oss.c:1714 snd_pcm_oss_release+0x276/0x300 sound/core/oss/pcm_oss.c:2556 __fput+0x288/0x920 fs/file_table.c:280 task_work_run+0xdd/0x1a0 kernel/task_work.c:164 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop kernel/entry/common.c:175 [inline] exit_to_user_mode_prepare+0x27e/0x290 kernel/entry/common.c:209 __syscall_exit_to_user_mode_work kernel/entry/common.c:291 [inline] syscall_exit_to_user_mode+0x19/0x60 kernel/entry/common.c:302 do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86 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-fuzzer/8464: #0: ffff88801900c440 (&runtime->oss.params_lock){+.+.}-{3:3}, at: snd_pcm_oss_change_params sound/core/oss/pcm_oss.c:1087 [inline] #0: ffff88801900c440 (&runtime->oss.params_lock){+.+.}-{3:3}, at: snd_pcm_oss_make_ready+0xc7/0x1b0 sound/core/oss/pcm_oss.c:1149 #1: ffff8880b9d4d620 (lock#2){-.-.}-{2:2}, at: __alloc_pages_bulk+0x4ad/0x1870 mm/page_alloc.c:5291 stack backtrace: CPU: 1 PID: 8464 Comm: syz-fuzzer 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+0xcd/0x134 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+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: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 alloc_pages+0x18c/0x2a0 mm/mempolicy.c:2272 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: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+0x39d/0x960 mm/vmalloc.c:2947 __vmalloc_node mm/vmalloc.c:2996 [inline] __vmalloc+0x69/0x80 mm/vmalloc.c:3010 snd_dma_alloc_pages+0x433/0x590 sound/core/memalloc.c:150 do_alloc_pages+0x9b/0x160 sound/core/pcm_memory.c:43 snd_pcm_lib_malloc_pages+0x3f6/0x880 sound/core/pcm_memory.c:404 snd_pcm_hw_params+0x1408/0x1990 sound/core/pcm_native.c:705 snd_pcm_kernel_ioctl+0xd1/0x240 sound/core/pcm_native.c:3332 snd_pcm_oss_change_params_locked+0x1958/0x3990 sound/core/oss/pcm_oss.c:947 snd_pcm_oss_change_params sound/core/oss/pcm_oss.c:1090 [inline] snd_pcm_oss_make_ready+0xe7/0x1b0 sound/core/oss/pcm_oss.c:1149 snd_pcm_oss_sync+0x1de/0x800 sound/core/oss/pcm_oss.c:1714 snd_pcm_oss_release+0x276/0x300 sound/core/oss/pcm_oss.c:2556 __fput+0x288/0x920 fs/file_table.c:280 task_work_run+0xdd/0x1a0 kernel/task_work.c:164 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop kernel/entry/common.c:175 [inline] exit_to_user_mode_prepare+0x27e/0x290 kernel/entry/common.c:209 __syscall_exit_to_user_mode_work kernel/entry/common.c:291 [inline] syscall_exit_to_user_mode+0x19/0x60 kernel/entry/common.c:302 do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x4af19b Code: fb ff eb bd e8 a6 b6 fb ff e9 61 ff ff ff cc e8 9b 82 fb ff 48 8b 7c 24 10 48 8b 74 24 18 48 8b 54 24 20 48 8b 44 24 08 0f 05 <48> 3d 01 f0 ff ff 76 20 48 c7 44 24 28 ff ff ff ff 48 c7 44 24 30 RSP: 002b:000000c00046d430 EFLAGS: 00000206 ORIG_RAX: 0000000000000003 RAX: 0000000000000000 RBX: 000000c00001e800 RCX: 00000000004af19b RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000006 RBP: 000000c00046d470 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000206 R12: 000000000000013e R13: 000000000000013d R14: 0000000000000200 R15: 000000c00040c000 BUG: sleeping function called from invalid context at mm/page_alloc.c:5179 in_atomic(): 0, irqs_disabled(): 1, non_block: 0, pid: 8464, name: syz-fuzzer INFO: lockdep is turned off. irq event stamp: 163908 hardirqs last enabled at (163907): [] __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:160 [inline] hardirqs last enabled at (163907): [] _raw_spin_unlock_irqrestore+0x50/0x70 kernel/locking/spinlock.c:191 hardirqs last disabled at (163908): [] __alloc_pages_bulk+0x1017/0x1870 mm/page_alloc.c:5291 softirqs last enabled at (161880): [] invoke_softirq kernel/softirq.c:432 [inline] softirqs last enabled at (161880): [] __irq_exit_rcu+0x16e/0x1c0 kernel/softirq.c:636 softirqs last disabled at (161871): [] invoke_softirq kernel/softirq.c:432 [inline] softirqs last disabled at (161871): [] __irq_exit_rcu+0x16e/0x1c0 kernel/softirq.c:636 CPU: 1 PID: 8464 Comm: syz-fuzzer 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+0xcd/0x134 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 alloc_pages+0x18c/0x2a0 mm/mempolicy.c:2272 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: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+0x39d/0x960 mm/vmalloc.c:2947 __vmalloc_node mm/vmalloc.c:2996 [inline] __vmalloc+0x69/0x80 mm/vmalloc.c:3010 snd_dma_alloc_pages+0x433/0x590 sound/core/memalloc.c:150 do_alloc_pages+0x9b/0x160 sound/core/pcm_memory.c:43 snd_pcm_lib_malloc_pages+0x3f6/0x880 sound/core/pcm_memory.c:404 snd_pcm_hw_params+0x1408/0x1990 sound/core/pcm_native.c:705 snd_pcm_kernel_ioctl+0xd1/0x240 sound/core/pcm_native.c:3332 snd_pcm_oss_change_params_locked+0x1958/0x3990 sound/core/oss/pcm_oss.c:947 snd_pcm_oss_change_params sound/core/oss/pcm_oss.c:1090 [inline] snd_pcm_oss_make_ready+0xe7/0x1b0 sound/core/oss/pcm_oss.c:1149 snd_pcm_oss_sync+0x1de/0x800 sound/core/oss/pcm_oss.c:1714 snd_pcm_oss_release+0x276/0x300 sound/core/oss/pcm_oss.c:2556 __fput+0x288/0x920 fs/file_table.c:280 task_work_run+0xdd/0x1a0 kernel/task_work.c:164 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop kernel/entry/common.c:175 [inline] exit_to_user_mode_prepare+0x27e/0x290 kernel/entry/common.c:209 __syscall_exit_to_user_mode_work kernel/entry/common.c:291 [inline] syscall_exit_to_user_mode+0x19/0x60 kernel/entry/common.c:302 do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x4af19b Code: fb ff eb bd e8 a6 b6 fb ff e9 61 ff ff ff cc e8 9b 82 fb ff 48 8b 7c 24 10 48 8b 74 24 18 48 8b 54 24 20 48 8b 44 24 08 0f 05 <48> 3d 01 f0 ff ff 76 20 48 c7 44 24 28 ff ff ff ff 48 c7 44 24 30 RSP: 002b:000000c00046d430 EFLAGS: 00000206 ORIG_RAX: 0000000000000003 RAX: 0000000000000000 RBX: 000000c00001e800 RCX: 00000000004af19b RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000006 RBP: 000000c00046d470 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000206 R12: 000000000000013e R13: 000000000000013d R14: 0000000000000200 R15: 000000c00040c000 can: request_module (can-proto-0) failed. can: request_module (can-proto-0) failed. can: request_module (can-proto-0) failed. base_sock_release(ffff888039852f40) sk=ffff88802cb37000