[AMD Official Use Only - AMD Internal Distribution Only] Hi Mikhail,
schedule_dc_vmin_vmax() has an allocation which is incorrectly using GFP_KERNEL, which is likely the reason for the "sleeping function called from invalid context". We have a fix queued for this week's update (switching it to GFP_NOWAIT). -- Regards, Jay ________________________________ From: Mikhail Gavrilov <[email protected]> Sent: Tuesday, October 7, 2025 1:33 PM To: Pillai, Aurabindo <[email protected]>; Kazlauskas, Nicholas <[email protected]>; Wu, Ray <[email protected]>; Wheeler, Daniel <[email protected]>; Li, Roman <[email protected]>; Chung, ChiaHsuan (Tom) <[email protected]>; Deucher, Alexander <[email protected]> Cc: amd-gfx list <[email protected]>; Linux List Kernel Mailing <[email protected]>; Linux regressions mailing list <[email protected]> Subject: Re: 6.18/regression/bisected – BUG: sleeping function called from invalid context at ./include/linux/sched/mm.h:321 after 6d31602a9f57 On Mon, Oct 6, 2025 at 12:11 AM Mikhail Gavrilov <[email protected]> wrote: > > Unfortunately, I couldn’t fully recheck the kernel without this commit > because reverting it leads to a merge conflict: > $ git revert -n 6d31602a9f57a7bb3c6c8dbde1d00af67e250a3f > Auto-merging drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c > CONFLICT (content): Merge conflict in > drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c > error: could not revert 6d31602a9f57... drm/amd/display: more liberal > vmin/vmax update for freesync Quick update: I was able to revert 6d31602a9f57 after reverting 9d6939179491 on top of c746c3b51698. $ git revert -n 9d6939179491 6d31602a9f57 Auto-merging drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c Auto-merging drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c With both reverts applied, the IRQ-context “sleeping function” flooding stops on my system. So the regression seems tied to that pair (at least on my setup). However, I now see a different WARN I hadn’t noticed before: [ 21.001620] [drm] Initialized amdgpu 3.64.0 for 0000:03:00.0 on minor 1 [ 21.005679] ------------[ cut here ]------------ [ 21.005682] WARNING: CPU: 23 PID: 910 at drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:138 amdgpu_vm_set_pasid+0x1bc/0x2b0 [amdgpu] [ 21.006017] Modules linked in: amdgpu(+) amdxcp i2c_algo_bit drm_ttm_helper ttm drm_exec drm_panel_backlight_quirks gpu_sched drm_suballoc_helper drm_buddy drm_display_helper polyval_clmulni ghash_clmulni_intel r8169 nvme_tcp cec nvme nvme_fabrics video realtek sp5100_tco wmi nvme_core nvme_keyring nvme_auth hkdf sunrpc be2iscsi bnx2i cnic uio cxgb4i cxgb4 tls cxgb3i cxgb3 mdio libcxgbi libcxgb qla4xxx iscsi_boot_sysfs iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi ntsync i2c_dev fuse nfnetlink [ 21.006069] CPU: 23 UID: 0 PID: 910 Comm: (udev-worker) Tainted: G L 6.17.0-c746c3b51698-rev-9d6939179491-6d31602a9f57+ #59 PREEMPT(lazy) [ 21.006073] Tainted: [L]=SOFTLOCKUP [ 21.006074] Hardware name: ASRock B650I Lightning WiFi/B650I Lightning WiFi, BIOS 3.30 06/16/2025 [ 21.006076] RIP: 0010:amdgpu_vm_set_pasid+0x1bc/0x2b0 [amdgpu] [ 21.006320] Code: c1 e9 03 80 3c 11 00 0f 85 f8 00 00 00 48 8b b8 80 01 00 00 be ff ff ff ff 48 83 c7 70 e8 ac b3 06 e7 85 c0 0f 85 9b fe ff ff <0f> 0b e9 94 fe ff ff 49 8d bf f0 fd 00 00 4c 89 44 24 08 89 34 24 [ 21.006322] RSP: 0018:ffffc900062bf338 EFLAGS: 00010246 [ 21.006326] RAX: 0000000000000000 RBX: ffff8881e87dc000 RCX: 0000000000000000 [ 21.006327] RDX: 0000000000000000 RSI: ffffffffa9790513 RDI: ffffffffa8cba320 [ 21.006329] RBP: 0000000000008000 R08: 0000000000000001 R09: ffffed103d0fa009 [ 21.006330] R10: 0000000000000017 R11: 0000000000000000 R12: ffff8881e87dc000 [ 21.006332] R13: ffff888124fa4000 R14: ffff88827cc80018 R15: ffff88827cc80000 [ 21.006333] FS: 00007f0e74dd7040(0000) GS:ffff8890282e0000(0000) knlGS:0000000000000000 [ 21.006337] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 21.006339] CR2: 0000560ee54ae9d0 CR3: 00000001f2871000 CR4: 0000000000f50ef0 [ 21.006340] PKRU: 55555554 [ 21.006341] Call Trace: [ 21.006342] <TASK> [ 21.006345] amdgpu_driver_open_kms+0x2c8/0x6b0 [amdgpu] [ 21.006591] drm_file_alloc+0x5d4/0xb10 [ 21.006597] drm_client_init+0x1ae/0x4d0 [ 21.006601] ? drm_dev_register.cold+0x187/0x21c [ 21.006604] ? drm_dev_register+0x1fe/0x770 [ 21.006608] amdgpu_amdkfd_drm_client_create+0x8f/0xe0 [amdgpu] [ 21.006897] amdgpu_pci_probe+0x503/0xd70 [amdgpu] [ 21.007137] ? __raw_spin_unlock_irqrestore+0x5d/0x80 [ 21.007140] ? __raw_spin_unlock_irqrestore+0x46/0x80 [ 21.007143] ? __pfx_amdgpu_pci_probe+0x10/0x10 [amdgpu] [ 21.007377] local_pci_probe+0xd6/0x190 [ 21.007382] pci_call_probe+0x176/0x520 [ 21.007384] ? __lock_release.isra.0+0x1cb/0x340 [ 21.007387] ? __pfx_pci_call_probe+0x10/0x10 [ 21.007389] ? __pfx___driver_attach+0x10/0x10 [ 21.007395] ? pci_match_device+0x386/0x790 [ 21.007397] ? kernfs_put+0x20/0x40 [ 21.007402] ? __pfx___driver_attach+0x10/0x10 [ 21.007404] pci_device_probe+0x179/0x2c0 [ 21.007407] really_probe+0x1de/0x890 [ 21.007411] ? __pfx___driver_attach+0x10/0x10 [ 21.007413] __driver_probe_device+0x18c/0x390 [ 21.007416] ? __pfx___driver_attach+0x10/0x10 [ 21.007418] driver_probe_device+0x4a/0x120 [ 21.007421] __driver_attach+0x1a0/0x530 [ 21.007424] ? __pfx___driver_attach+0x10/0x10 [ 21.007426] bus_for_each_dev+0x108/0x190 [ 21.007430] ? __pfx_bus_for_each_dev+0x10/0x10 [ 21.007434] ? __pfx_amdgpu_init+0x10/0x10 [amdgpu] [ 21.007673] ? __pfx_amdgpu_init+0x10/0x10 [amdgpu] [ 21.007916] bus_add_driver+0x2eb/0x540 [ 21.007920] ? __pfx_amdgpu_init+0x10/0x10 [amdgpu] [ 21.008155] driver_register+0x1a3/0x3a0 [ 21.008160] do_one_initcall+0xd2/0x450 [ 21.008165] ? __pfx_do_one_initcall+0x10/0x10 [ 21.008169] ? kasan_unpoison+0x10/0x70 [ 21.008173] ? kasan_unpoison+0x44/0x70 [ 21.008177] do_init_module+0x2cc/0x8f0 [ 21.008183] ? __pfx_do_init_module+0x10/0x10 [ 21.008185] ? rcu_read_lock_any_held.part.0+0x4a/0x80 [ 21.008188] ? touch_atime+0x24a/0x490 [ 21.008194] init_module_from_file+0xe1/0x160 [ 21.008196] ? __pfx_init_module_from_file+0x10/0x10 [ 21.008204] ? local_clock+0x15/0x30 [ 21.008207] ? __lock_release.isra.0+0x1cb/0x340 [ 21.008211] ? do_raw_spin_unlock+0x59/0x230 [ 21.008215] idempotent_init_module+0x21e/0x750 [ 21.008217] ? __pfx_cred_has_capability.isra.0+0x10/0x10 [ 21.008221] ? __pfx_idempotent_init_module+0x10/0x10 [ 21.008229] ? security_capable+0x87/0x150 [ 21.008233] __x64_sys_finit_module+0xcd/0x150 [ 21.008237] do_syscall_64+0x98/0x350 [ 21.008244] ? __x64_sys_pread64+0x191/0x250 [ 21.008248] ? __pfx___x64_sys_pread64+0x10/0x10 [ 21.008252] ? rcu_is_watching+0x15/0xe0 [ 21.008255] ? lockdep_hardirqs_on+0x8c/0x130 [ 21.008257] ? entry_SYSCALL_64_after_hwframe+0x76/0x7e [ 21.008259] ? do_syscall_64+0x13b/0x350 [ 21.008261] ? __pfx_do_sys_openat2+0x10/0x10 [ 21.008267] ? __pfx___seccomp_filter+0x10/0x10 [ 21.008272] ? __x64_sys_openat+0x10e/0x210 [ 21.008276] ? __x64_sys_pread64+0x191/0x250 [ 21.008278] ? __pfx___x64_sys_openat+0x10/0x10 [ 21.008282] ? rcu_is_watching+0x15/0xe0 [ 21.008285] ? lockdep_hardirqs_on+0x8c/0x130 [ 21.008287] ? entry_SYSCALL_64_after_hwframe+0x76/0x7e [ 21.008288] ? do_syscall_64+0x13b/0x350 [ 21.008290] ? rcu_is_watching+0x15/0xe0 [ 21.008294] entry_SYSCALL_64_after_hwframe+0x76/0x7e [ 21.008296] RIP: 0033:0x7f0e7574220d [ 21.008303] Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 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 8b 0d c3 6b 0f 00 f7 d8 64 89 01 48 [ 21.008305] RSP: 002b:00007ffc190432d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000139 [ 21.008307] RAX: ffffffffffffffda RBX: 0000564eea438730 RCX: 00007f0e7574220d [ 21.008308] RDX: 0000000000000000 RSI: 0000564eea43a070 RDI: 00000000000000b5 [ 21.008309] RBP: 00007ffc19043370 R08: 0000000000000000 R09: 0000564eea439cd0 [ 21.008310] R10: 0000000000000000 R11: 0000000000000246 R12: 0000564eea43a070 [ 21.008311] R13: 0000564eea4331b0 R14: 0000000000020000 R15: 0000000000000000 [ 21.008317] </TASK> [ 21.008321] irq event stamp: 1120885 This PASID-related WARN could be unrelated to the vmin/vmax path; if you’d like, I can bisect it separately. Either way, I’m happy to test any proposed fix (e.g., deferring vmin/vmax updates from IRQ to a workqueue, or restoring the older condition so the update doesn’t run in IRQ). I’ve attached below the full kernel log after the revert. -- Best Regards, Mike Gavrilov.
