Bug 214427

Summary: Amdgpu hangs kernel on boot trying init debugfs
Product: Drivers Reporter: Ilia (inferrna)
Component: Video(DRI - non Intel)Assignee: drivers_video-dri
Status: NEW ---    
Severity: normal CC: alexdeucher
Priority: P1    
Hardware: x86-64   
OS: Linux   
Kernel Version: 5.14.4 Subsystem:
Regression: No Bisected commit-id:
Attachments: Screenshot
Kernel config
config patch

Description Ilia 2021-09-16 08:17:01 UTC
Created attachment 298831 [details]
Screenshot

Early on kernel 5.10 and before it was just
[drm] Initialized amdgpu 3.40.0 20150101 for 0000:05:00.0 on minor 0
[drm:amdgpu_debugfs_init] *ERROR* Failed to init debugfs
[drm:amdgpu_pci_probe] *ERROR* Creating debugfs files failed (-1).

but now it became panic. Kernel patched with https://github.com/dolohow/uksm/blob/master/v5.x/uksm-5.14.patch - I'm using it since version 4 without problems.

Panic starts with

RIP: 0010:debugfs_create_file_size+0x2e/0x40

..and see more on the picture
Comment 1 Ilia 2021-09-16 08:18:04 UTC
Created attachment 298833 [details]
Kernel config
Comment 2 Ilia 2021-09-16 08:20:24 UTC
Also my GPU is Polaris RX460 (ASUS ROG 4Gb) flashed with bios from RX560. Past 3 years all was working good.
Comment 3 Ilia 2021-09-16 10:56:26 UTC
Created attachment 298835 [details]
config patch

It seems like amdgpu strongly requires access to debugfs and panics when CONFIG_DEBUG_FS_ALLOW_NONE is set. Also there is no debugfs-related flag for amdgpu - it seems or amdgpu should depend on CONFIG_DEBUG_FS_ALLOW_ALL, or it should have separate debugfs flag to enable/disable debugfs usage (it is seems very possible as it was working early w/o access to debugfs).
Comment 4 Alex Deucher 2021-09-16 13:39:28 UTC
Looks like a duplicate of:
https://gitlab.freedesktop.org/drm/amd/-/issues/1686