possible circular locking dependency detected while loading falcon firmware
[ 10.238490] ======================================================
[ 10.238492] WARNING: possible circular locking dependency detected
[ 10.238494] 6.3.0-rc6paul1 #1 Tainted: G E
[ 10.238496] ------------------------------------------------------
[ 10.238497] ibus-extension-/1471 is trying to acquire lock:
[ 10.238499] ffff90d7c98fce18 (&mm->mmap_lock){++++}-{4:4}, at: do_user_addr_fault+0x425/0x730
[ 10.238507]
but task is already holding lock:
[ 10.238509] ffff90d7c9fc16d0 (&type->i_mutex_dir_key#6){++++}-{4:4}, at: iterate_dir+0x56/0x1d0
[ 10.238516]
which lock already depends on the new lock.
[ 10.238518]
the existing dependency chain (in reverse order) is:
[ 10.238519]
-> #4 (&type->i_mutex_dir_key#6){++++}-{4:4}:
[ 10.238524] down_read+0x31/0x40
[ 10.238528] walk_component+0xd6/0x160
[ 10.238531] link_path_walk.part.0+0x253/0x3a0
[ 10.238534] path_openat+0xb2/0xa40
[ 10.238537] do_file_open_root+0x100/0x1e0
[ 10.238539] file_open_root+0xdb/0x1a0
[ 10.238542] kernel_read_file_from_path_initns+0xc8/0x140
[ 10.238545] _request_firmware+0x24f/0x610
[ 10.238549] request_firmware+0x36/0x50
[ 10.238551] nvkm_falcon_init+0x5f2/0x870 [nouveau]
[ 10.238647] nvkm_engine_init+0x38/0xa0 [nouveau]
[ 10.238691] nvkm_subdev_init_.part.0+0x64/0x130 [nouveau]
[ 10.238740] nvkm_subdev_ref+0xb1/0x110 [nouveau]
[ 10.238787] nvkm_engine_ref+0x1c/0x30 [nouveau]
[ 10.238831] nvkm_ioctl_new+0x188/0x2a0 [nouveau]
[ 10.238877] nvkm_ioctl+0x102/0x260 [nouveau]
[ 10.238922] usif_ioctl+0x2a7/0x450 [nouveau]
[ 10.238995] nouveau_drm_ioctl+0xa2/0xb0 [nouveau]
[ 10.239067] __x64_sys_ioctl+0x8c/0xc0
[ 10.239071] do_syscall_64+0x3c/0x90
[ 10.239074] entry_SYSCALL_64_after_hwframe+0x72/0xdc
[ 10.239078]
-> #3 (&subdev->use.mutex#23){+.+.}-{4:4}:
[ 10.239083] __mutex_lock+0x74/0xcb0
[ 10.239086] nvkm_subdev_init+0x1f/0xa0 [nouveau]
[ 10.239134] nvkm_device_init+0x16d/0x2e0 [nouveau]
[ 10.239214] nvkm_udevice_init+0x51/0x80 [nouveau]
[ 10.239293] nvkm_object_init+0x3f/0x1c0 [nouveau]
[ 10.239339] nvkm_ioctl_new+0x1d4/0x2a0 [nouveau]
[ 10.239385] nvkm_ioctl+0x102/0x260 [nouveau]
[ 10.239430] nvif_object_ctor+0x126/0x1a0 [nouveau]
[ 10.239473] nvif_device_ctor+0x23/0x60 [nouveau]
[ 10.239516] nouveau_cli_init+0x187/0x5a0 [nouveau]
[ 10.239587] nouveau_drm_device_init+0x6d/0x9a0 [nouveau]
[ 10.239657] nouveau_drm_probe+0x123/0x280 [nouveau]
[ 10.239726] local_pci_probe+0x47/0xa0
[ 10.239730] pci_device_probe+0xc9/0x240
[ 10.239733] really_probe+0x1a2/0x410
[ 10.239736] __driver_probe_device+0x78/0x180
[ 10.239739] driver_probe_device+0x1e/0x90
[ 10.239741] __driver_attach+0xda/0x1d0
[ 10.239744] bus_for_each_dev+0x7c/0xd0
[ 10.239746] bus_add_driver+0x119/0x220
[ 10.239748] driver_register+0x60/0x120
[ 10.239751] do_one_initcall+0x5c/0x280
[ 10.239754] do_init_module+0x4c/0x210
[ 10.239757] __do_sys_finit_module+0xb4/0x130
[ 10.239759] do_syscall_64+0x3c/0x90
[ 10.239762] entry_SYSCALL_64_after_hwframe+0x72/0xdc
[ 10.239764]
-> #2 (&device->mutex){+.+.}-{4:4}:
[ 10.239769] __mutex_lock+0x74/0xcb0
[ 10.239771] nvkm_udevice_fini+0x29/0x70 [nouveau]
[ 10.239852] nvkm_object_fini+0xbd/0x250 [nouveau]
[ 10.239899] nvkm_object_fini+0x77/0x250 [nouveau]
[ 10.239946] nvkm_ioctl_del+0x86/0xa0 [nouveau]
[ 10.239992] nvkm_ioctl+0x102/0x260 [nouveau]
[ 10.240038] nvif_object_dtor+0x84/0xb0 [nouveau]
[ 10.240081] nvif_client_dtor+0x12/0x40 [nouveau]
[ 10.240124] nouveau_cli_fini+0x7a/0x90 [nouveau]
[ 10.240194] nouveau_drm_postclose+0x104/0x140 [nouveau]
[ 10.240264] drm_file_free+0x21e/0x290 [drm]
[ 10.240300] drm_release+0x7d/0x100 [drm]
[ 10.240329] __fput+0x89/0x250
[ 10.240332] task_work_run+0x5a/0x90
[ 10.240335] exit_to_user_mode_prepare+0x1b8/0x1c0
[ 10.240339] syscall_exit_to_user_mode+0x1a/0x40
[ 10.240342] do_syscall_64+0x4c/0x90
[ 10.240345] entry_SYSCALL_64_after_hwframe+0x72/0xdc
[ 10.240347]
-> #1 (&cli->lock){+.+.}-{4:4}:
[ 10.240351] __mutex_lock+0x74/0xcb0
[ 10.240354] nouveau_mem_fini+0x59/0x80 [nouveau]
[ 10.240426] nouveau_sgdma_unbind+0x1b/0x30 [nouveau]
[ 10.240496] nouveau_ttm_tt_unpopulate+0x41/0x50 [nouveau]
[ 10.240566] ttm_tt_unpopulate.part.0+0x1c/0x70 [ttm]
[ 10.240574] ttm_bo_cleanup_memtype_use+0x3a/0x70 [ttm]
[ 10.240581] ttm_bo_release+0x163/0x320 [ttm]
[ 10.240588] ttm_bo_vm_close+0x16/0x30 [ttm]
[ 10.240595] remove_vma+0x25/0x50
[ 10.240599] do_vmi_align_munmap+0x304/0x430
[ 10.240602] do_vmi_munmap+0xf1/0x130
[ 10.240605] __vm_munmap+0xa1/0x160
[ 10.240608] __x64_sys_munmap+0x1b/0x30
[ 10.240610] do_syscall_64+0x3c/0x90
[ 10.240612] entry_SYSCALL_64_after_hwframe+0x72/0xdc
[ 10.240614]
-> #0 (&mm->mmap_lock){++++}-{4:4}:
[ 10.240619] __lock_acquire+0x148b/0x2210
[ 10.240622] lock_acquire+0xd9/0x2f0
[ 10.240624] down_read+0x31/0x40
[ 10.240627] do_user_addr_fault+0x425/0x730
[ 10.240630] exc_page_fault+0x83/0x200
[ 10.240632] asm_exc_page_fault+0x26/0x30
[ 10.240634] filldir64+0xb2/0x180
[ 10.240637] call_filldir+0x74/0x110 [ext4]
[ 10.240666] ext4_readdir+0x7ee/0xa00 [ext4]
[ 10.240687] iterate_dir+0x183/0x1d0
[ 10.240689] __x64_sys_getdents64+0x7e/0x130
[ 10.240692] do_syscall_64+0x3c/0x90
[ 10.240695] entry_SYSCALL_64_after_hwframe+0x72/0xdc
[ 10.240697]
other info that might help us debug this:
[ 10.240699] Chain exists of:
&mm->mmap_lock --> &subdev->use.mutex#23 --> &type->i_mutex_dir_key#6
[ 10.240705] Possible unsafe locking scenario:
[ 10.240707] CPU0 CPU1
[ 10.240708] ---- ----
[ 10.240709] lock(&type->i_mutex_dir_key#6);
[ 10.240712] lock(&subdev->use.mutex#23);
[ 10.240715] lock(&type->i_mutex_dir_key#6);
[ 10.240718] lock(&mm->mmap_lock);
[ 10.240721]
*** DEADLOCK ***
[ 10.240722] 2 locks held by ibus-extension-/1471:
[ 10.240724] #0: ffff90d7c7e628e8 (&f->f_pos_lock){+.+.}-{4:4}, at: __fdget_pos+0x4c/0x60
[ 10.240732] #1: ffff90d7c9fc16d0 (&type->i_mutex_dir_key#6){++++}-{4:4}, at: iterate_dir+0x56/0x1d0
[ 10.240738]
stack backtrace:
[ 10.240740] CPU: 0 PID: 1471 Comm: ibus-extension- Tainted: G E 6.3.0-rc6paul1 #1
[ 10.240743] Hardware name: System manufacturer System Product Name/PRIME H310M-C R2.0, BIOS 2208 07/09/2021
[ 10.240745] Call Trace:
[ 10.240747] <TASK>
[ 10.240750] dump_stack_lvl+0x77/0xd0
[ 10.240754] check_noncircular+0xf6/0x110
[ 10.240760] __lock_acquire+0x148b/0x2210
[ 10.240767] lock_acquire+0xd9/0x2f0
[ 10.240770] ? do_user_addr_fault+0x425/0x730
[ 10.240773] ? bsearch+0x57/0x90
[ 10.240777] ? __pfx_cmp_ex_search+0x10/0x10
[ 10.240781] down_read+0x31/0x40
[ 10.240784] ? do_user_addr_fault+0x425/0x730
[ 10.240786] do_user_addr_fault+0x425/0x730
[ 10.240790] exc_page_fault+0x83/0x200
[ 10.240794] asm_exc_page_fault+0x26/0x30
[ 10.240797] RIP: 0010:filldir64+0xb2/0x180
[ 10.240801] Code: 29 c7 48 39 f7 0f 87 9d 00 00 00 0f 01 cb 0f ae e8 4c 89 6f 08 4d 89 30 66 45 89 78 10 0f b6 44 24 04 41 88 40 12 49 8d 40 13 <41> c6 44 28 13 00 eb 13 49 8b 14 24 48 89 10 48 83 c0 08 49 83 c4
[ 10.240803] RSP: 0018:ffffa84083acfd98 EFLAGS: 00050283
[ 10.240807] RAX: 000055c071b97ffb RBX: ffffa84083acfee0 RCX: 0000000000000028
[ 10.240809] RDX: 0000000000000048 RSI: 00007fffffffefb8 RDI: 000055c071b97fc8
[ 10.240810] RBP: 000000000000000f R08: 000055c071b97fe8 R09: 0000000000000008
[ 10.240812] R10: 00000000ebc00aea R11: 0000000000000001 R12: ffff90d7c8f0222e
[ 10.240814] R13: 3194253b08c063d5 R14: 00000000001a4ed9 R15: 0000000000000028
[ 10.240821] ? filldir64+0x3e/0x180
[ 10.240826] call_filldir+0x74/0x110 [ext4]
[ 10.240850] ext4_readdir+0x7ee/0xa00 [ext4]
[ 10.240876] iterate_dir+0x183/0x1d0
[ 10.240880] __x64_sys_getdents64+0x7e/0x130
[ 10.240883] ? __pfx_filldir64+0x10/0x10
[ 10.240888] do_syscall_64+0x3c/0x90
[ 10.240891] entry_SYSCALL_64_after_hwframe+0x72/0xdc
[ 10.240894] RIP: 0033:0x7fa89a6c42c7
[ 10.240897] Code: 0f 1f 00 48 8b 47 20 c3 66 2e 0f 1f 84 00 00 00 00 00 90 48 81 fa ff ff ff 7f b8 ff ff ff 7f 48 0f 47 d0 b8 d9 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 8b 15 99 ab 10 00 f7 d8 64 89 02 48
[ 10.240899] RSP: 002b:00007ffd131c9a28 EFLAGS: 00000293 ORIG_RAX: 00000000000000d9
[ 10.240902] RAX: ffffffffffffffda RBX: 000055c071b97850 RCX: 00007fa89a6c42c7
[ 10.240904] RDX: 0000000000008000 RSI: 000055c071b97880 RDI: 0000000000000009
[ 10.240906] RBP: 000055c071b97880 R08: 0000000000000030 R09: 00007fa89a7cfbe0
[ 10.240907] R10: fffffffffffff9be R11: 0000000000000293 R12: ffffffffffffff80
[ 10.240909] R13: 000055c071b97854 R14: 0000000000000002 R15: 000055c071b97850
[ 10.240916] </TASK>
[ 13.665668] kobject: '0:50' (00000000a168a499): kobject_add_internal: parent: 'bdi', set: 'devices'
[ 13.665700] kobject: '0:50' (00000000a168a499): kobject_uevent_env
[ 13.665704] kobject: '0:50' (00000000a168a499): fill_kobj_path: path = '/devices/virtual/bdi/0:50'
[ 15.029079] snd_hda_intel 0000:01:00.1: saving config space at offset 0x0 (reading 0xe0b10de)
[ 15.029086] snd_hda_intel 0000:01:00.1: saving config space at offset 0x4 (reading 0x100006)
[ 15.029090] snd_hda_intel 0000:01:00.1: saving config space at offset 0x8 (reading 0x40300a1)
[ 15.029094] snd_hda_intel 0000:01:00.1: saving config space at offset 0xc (reading 0x800010)
[ 15.029097] snd_hda_intel 0000:01:00.1: saving config space at offset 0x10 (reading 0xf7080000)
[ 15.029100] snd_hda_intel 0000:01:00.1: saving config space at offset 0x14 (reading 0x0)