cfg80211: failed to load regulatory.db ====================================================== WARNING: possible circular locking dependency detected 6.0.0-rc7-syzkaller-00130-g511cce163b75 #0 Not tainted ------------------------------------------------------ kworker/0:1/15 is trying to acquire lock: ffffffff8c0be788 (zonelist_update_seq.seqcount){...-}-{0:0}, at: __alloc_pages+0x43d/0x510 mm/page_alloc.c:5562 but task is already holding lock: ffff88802c8283d8 (&base->lock){-.-.}-{2:2}, at: lock_timer_base+0x5a/0x1f0 kernel/time/timer.c:999 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #4 (&base->lock){-.-.}-{2:2}: __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x39/0x50 kernel/locking/spinlock.c:162 lock_timer_base+0x5a/0x1f0 kernel/time/timer.c:999 __mod_timer+0x398/0xe30 kernel/time/timer.c:1072 __queue_delayed_work+0x1a7/0x270 kernel/workqueue.c:1676 queue_delayed_work_on+0x105/0x120 kernel/workqueue.c:1701 psi_enqueue kernel/sched/stats.h:136 [inline] enqueue_task+0x1ec/0x3a0 kernel/sched/core.c:2062 activate_task kernel/sched/core.c:2091 [inline] wake_up_new_task+0x582/0xbf0 kernel/sched/core.c:4680 kernel_clone+0x1eb/0xab0 kernel/fork.c:2695 user_mode_thread+0xad/0xe0 kernel/fork.c:2740 rest_init+0x23/0x270 init/main.c:692 arch_call_rest_init+0xf/0x14 init/main.c:883 start_kernel+0x46e/0x48f init/main.c:1138 secondary_startup_64_no_verify+0xce/0xdb -> #3 (&rq->__lock){-.-.}-{2:2}: _raw_spin_lock_nested+0x30/0x40 kernel/locking/spinlock.c:378 raw_spin_rq_lock_nested+0x2b/0x120 kernel/sched/core.c:544 raw_spin_rq_lock kernel/sched/sched.h:1355 [inline] rq_lock kernel/sched/sched.h:1653 [inline] task_fork_fair+0x68/0x520 kernel/sched/fair.c:11440 sched_cgroup_fork+0x340/0x480 kernel/sched/core.c:4624 copy_process+0x4416/0x7090 kernel/fork.c:2371 kernel_clone+0xe7/0xab0 kernel/fork.c:2671 user_mode_thread+0xad/0xe0 kernel/fork.c:2740 rest_init+0x23/0x270 init/main.c:692 arch_call_rest_init+0xf/0x14 init/main.c:883 start_kernel+0x46e/0x48f init/main.c:1138 secondary_startup_64_no_verify+0xce/0xdb -> #2 (&p->pi_lock){-.-.}-{2:2}: __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x39/0x50 kernel/locking/spinlock.c:162 try_to_wake_up+0xab/0x1e60 kernel/sched/core.c:4082 up+0x75/0xb0 kernel/locking/semaphore.c:191 __up_console_sem+0xa4/0xc0 kernel/printk/printk.c:263 __console_unlock kernel/printk/printk.c:2652 [inline] console_unlock+0x480/0x5a0 kernel/printk/printk.c:2863 vga_remove_vgacon drivers/pci/vgaarb.c:189 [inline] vga_remove_vgacon.cold+0x99/0x9e drivers/pci/vgaarb.c:170 aperture_remove_conflicting_pci_devices+0x59/0x200 drivers/video/aperture.c:336 virtio_gpu_pci_quirk drivers/gpu/drm/virtio/virtgpu_drv.c:61 [inline] virtio_gpu_probe.cold+0x16a/0x189 drivers/gpu/drm/virtio/virtgpu_drv.c:118 virtio_dev_probe+0x577/0x870 drivers/virtio/virtio.c:305 call_driver_probe drivers/base/dd.c:560 [inline] really_probe+0x249/0xb90 drivers/base/dd.c:639 __driver_probe_device+0x1df/0x4d0 drivers/base/dd.c:778 driver_probe_device+0x4c/0x1a0 drivers/base/dd.c:808 __driver_attach+0x1d0/0x550 drivers/base/dd.c:1190 bus_for_each_dev+0x147/0x1d0 drivers/base/bus.c:301 bus_add_driver+0x4c9/0x640 drivers/base/bus.c:618 driver_register+0x220/0x3a0 drivers/base/driver.c:246 do_one_initcall+0xfe/0x650 init/main.c:1296 do_initcall_level init/main.c:1369 [inline] do_initcalls init/main.c:1385 [inline] do_basic_setup init/main.c:1404 [inline] kernel_init_freeable+0x6b1/0x73a init/main.c:1623 kernel_init+0x1a/0x1d0 init/main.c:1512 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 -> #1 ((console_sem).lock){-...}-{2:2}: __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x39/0x50 kernel/locking/spinlock.c:162 down_trylock+0xe/0x60 kernel/locking/semaphore.c:139 __down_trylock_console_sem+0x40/0x120 kernel/printk/printk.c:246 console_trylock kernel/printk/printk.c:2586 [inline] console_trylock_spinning kernel/printk/printk.c:1870 [inline] vprintk_emit+0x167/0x5f0 kernel/printk/printk.c:2270 vprintk+0x80/0x90 kernel/printk/printk_safe.c:50 _printk+0xba/0xed kernel/printk/printk.c:2292 build_zonelists+0x2e7/0x400 mm/page_alloc.c:6468 __build_all_zonelists+0x111/0x180 mm/page_alloc.c:6584 build_all_zonelists_init+0x2f/0x104 mm/page_alloc.c:6609 build_all_zonelists+0x11f/0x140 mm/page_alloc.c:6642 start_kernel+0xb9/0x48f init/main.c:960 secondary_startup_64_no_verify+0xce/0xdb -> #0 (zonelist_update_seq.seqcount){...-}-{0:0}: check_prev_add kernel/locking/lockdep.c:3095 [inline] check_prevs_add kernel/locking/lockdep.c:3214 [inline] validate_chain kernel/locking/lockdep.c:3829 [inline] __lock_acquire+0x2a43/0x56d0 kernel/locking/lockdep.c:5053 lock_acquire kernel/locking/lockdep.c:5666 [inline] lock_acquire+0x1ab/0x570 kernel/locking/lockdep.c:5631 seqcount_lockdep_reader_access include/linux/seqlock.h:102 [inline] read_seqbegin include/linux/seqlock.h:836 [inline] zonelist_iter_begin mm/page_alloc.c:4722 [inline] __alloc_pages_slowpath.constprop.0+0x1a5/0x2300 mm/page_alloc.c:5044 __alloc_pages+0x43d/0x510 mm/page_alloc.c:5562 __alloc_pages_node include/linux/gfp.h:243 [inline] kmem_getpages mm/slab.c:1363 [inline] cache_grow_begin+0x75/0x360 mm/slab.c:2569 cache_alloc_refill+0x27f/0x380 mm/slab.c:2942 ____cache_alloc mm/slab.c:3018 [inline] ____cache_alloc mm/slab.c:3001 [inline] __do_cache_alloc mm/slab.c:3246 [inline] slab_alloc mm/slab.c:3287 [inline] __kmem_cache_alloc_lru mm/slab.c:3471 [inline] kmem_cache_alloc+0x433/0x520 mm/slab.c:3491 kmem_cache_zalloc include/linux/slab.h:723 [inline] fill_pool+0x264/0x5c0 lib/debugobjects.c:168 __debug_object_init+0x7a/0xd10 lib/debugobjects.c:562 debug_object_init lib/debugobjects.c:617 [inline] debug_object_activate+0x32c/0x3e0 lib/debugobjects.c:703 debug_timer_activate kernel/time/timer.c:782 [inline] __mod_timer+0x77d/0xe30 kernel/time/timer.c:1103 __queue_delayed_work+0x1a7/0x270 kernel/workqueue.c:1676 queue_delayed_work_on+0x105/0x120 kernel/workqueue.c:1701 queue_delayed_work include/linux/workqueue.h:518 [inline] call_crda+0x291/0x3b0 net/wireless/reg.c:587 reg_query_database net/wireless/reg.c:1158 [inline] reg_process_hint_core net/wireless/reg.c:2693 [inline] reg_process_hint+0x925/0x1710 net/wireless/reg.c:3036 reg_process_pending_hints net/wireless/reg.c:3124 [inline] reg_todo+0x1a5/0x7d0 net/wireless/reg.c:3212 process_one_work+0x991/0x1610 kernel/workqueue.c:2289 worker_thread+0x665/0x1080 kernel/workqueue.c:2436 kthread+0x2e4/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 other info that might help us debug this: Chain exists of: zonelist_update_seq.seqcount --> &rq->__lock --> &base->lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&base->lock); lock(&rq->__lock); lock(&base->lock); lock(zonelist_update_seq.seqcount); *** DEADLOCK *** 4 locks held by kworker/0:1/15: #0: ffff888011867d38 ((wq_completion)events){+.+.}-{0:0}, at: arch_atomic64_set arch/x86/include/asm/atomic64_64.h:34 [inline] #0: ffff888011867d38 ((wq_completion)events){+.+.}-{0:0}, at: arch_atomic_long_set include/linux/atomic/atomic-long.h:41 [inline] #0: ffff888011867d38 ((wq_completion)events){+.+.}-{0:0}, at: atomic_long_set include/linux/atomic/atomic-instrumented.h:1280 [inline] #0: ffff888011867d38 ((wq_completion)events){+.+.}-{0:0}, at: set_work_data kernel/workqueue.c:636 [inline] #0: ffff888011867d38 ((wq_completion)events){+.+.}-{0:0}, at: set_work_pool_and_clear_pending kernel/workqueue.c:663 [inline] #0: ffff888011867d38 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x87a/0x1610 kernel/workqueue.c:2260 #1: ffffc9000062fda8 (reg_work){+.+.}-{0:0}, at: process_one_work+0x8ae/0x1610 kernel/workqueue.c:2264 #2: ffffffff8d7a89e8 (rtnl_mutex){+.+.}-{3:3}, at: reg_todo+0x18/0x7d0 net/wireless/reg.c:3211 #3: ffff88802c8283d8 (&base->lock){-.-.}-{2:2}, at: lock_timer_base+0x5a/0x1f0 kernel/time/timer.c:999 stack backtrace: CPU: 0 PID: 15 Comm: kworker/0:1 Not tainted 6.0.0-rc7-syzkaller-00130-g511cce163b75 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.14.0-2 04/01/2014 Workqueue: events reg_todo Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 check_noncircular+0x25f/0x2e0 kernel/locking/lockdep.c:2175 check_prev_add kernel/locking/lockdep.c:3095 [inline] check_prevs_add kernel/locking/lockdep.c:3214 [inline] validate_chain kernel/locking/lockdep.c:3829 [inline] __lock_acquire+0x2a43/0x56d0 kernel/locking/lockdep.c:5053 lock_acquire kernel/locking/lockdep.c:5666 [inline] lock_acquire+0x1ab/0x570 kernel/locking/lockdep.c:5631 seqcount_lockdep_reader_access include/linux/seqlock.h:102 [inline] read_seqbegin include/linux/seqlock.h:836 [inline] zonelist_iter_begin mm/page_alloc.c:4722 [inline] __alloc_pages_slowpath.constprop.0+0x1a5/0x2300 mm/page_alloc.c:5044 __alloc_pages+0x43d/0x510 mm/page_alloc.c:5562 __alloc_pages_node include/linux/gfp.h:243 [inline] kmem_getpages mm/slab.c:1363 [inline] cache_grow_begin+0x75/0x360 mm/slab.c:2569 cache_alloc_refill+0x27f/0x380 mm/slab.c:2942 ____cache_alloc mm/slab.c:3018 [inline] ____cache_alloc mm/slab.c:3001 [inline] __do_cache_alloc mm/slab.c:3246 [inline] slab_alloc mm/slab.c:3287 [inline] __kmem_cache_alloc_lru mm/slab.c:3471 [inline] kmem_cache_alloc+0x433/0x520 mm/slab.c:3491 kmem_cache_zalloc include/linux/slab.h:723 [inline] fill_pool+0x264/0x5c0 lib/debugobjects.c:168 __debug_object_init+0x7a/0xd10 lib/debugobjects.c:562 debug_object_init lib/debugobjects.c:617 [inline] debug_object_activate+0x32c/0x3e0 lib/debugobjects.c:703 debug_timer_activate kernel/time/timer.c:782 [inline] __mod_timer+0x77d/0xe30 kernel/time/timer.c:1103 __queue_delayed_work+0x1a7/0x270 kernel/workqueue.c:1676 queue_delayed_work_on+0x105/0x120 kernel/workqueue.c:1701 queue_delayed_work include/linux/workqueue.h:518 [inline] call_crda+0x291/0x3b0 net/wireless/reg.c:587 reg_query_database net/wireless/reg.c:1158 [inline] reg_process_hint_core net/wireless/reg.c:2693 [inline] reg_process_hint+0x925/0x1710 net/wireless/reg.c:3036 reg_process_pending_hints net/wireless/reg.c:3124 [inline] reg_todo+0x1a5/0x7d0 net/wireless/reg.c:3212 process_one_work+0x991/0x1610 kernel/workqueue.c:2289 worker_thread+0x665/0x1080 kernel/workqueue.c:2436 kthread+0x2e4/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306