[PATCH 0/2] drm/panic: Avoid crash from invalid CONFIG_DRM_PANIC_SCREEN values

Nathan Chancellor posted 2 patches 1 month ago
drivers/gpu/drm/drm_panic.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
[PATCH 0/2] drm/panic: Avoid crash from invalid CONFIG_DRM_PANIC_SCREEN values
Posted by Nathan Chancellor 1 month ago
Hi all,

This series addresses a couple of issues I noticed when accessing
/sys/module/drm/parameters/panic_screen on my Arch Linux machines, which
have "qr_code" as the value of CONFIG_DRM_PANIC_SCREEN. This happened to
be unsupported in my configuration since I was missing some Rust
dependencies in my environment for CONFIG_DRM_PANIC_SCREEN_QR_CODE,
resulting in a kernel crash. Patch one addresses the root cause of the
crash and patch two addresses an inconsistency I noticed between this
new code and the documented value for CONFIG_DRM_PANIC_SCREEN in Kconfig
for qr_code.

If there are any issues, please let me know.

---
Nathan Chancellor (2):
      drm/panic: Ensure drm_panic_type is initialized to a valid value
      drm/panic: Fix expected string for QR_CODE in drm_panic_type_map

 drivers/gpu/drm/drm_panic.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
---
base-commit: 349d4efadc1f831ebc0b872ba1e3a2b7dd58b72b
change-id: 20260105-drm_panic-handle-invalid-drm_panic_screen-097e49e21c49

Best regards,
--  
Nathan Chancellor <nathan@kernel.org>
Re: [PATCH 0/2] drm/panic: Avoid crash from invalid CONFIG_DRM_PANIC_SCREEN values
Posted by Tvrtko Ursulin 1 month ago
On 06/01/2026 06:19, Nathan Chancellor wrote:
> Hi all,
> 
> This series addresses a couple of issues I noticed when accessing
> /sys/module/drm/parameters/panic_screen on my Arch Linux machines, which
> have "qr_code" as the value of CONFIG_DRM_PANIC_SCREEN. This happened to
> be unsupported in my configuration since I was missing some Rust
> dependencies in my environment for CONFIG_DRM_PANIC_SCREEN_QR_CODE,
> resulting in a kernel crash. Patch one addresses the root cause of the
> crash and patch two addresses an inconsistency I noticed between this
> new code and the documented value for CONFIG_DRM_PANIC_SCREEN in Kconfig
> for qr_code.
> 
> If there are any issues, please let me know.

I've pushed the series to drm-misc-next, thanks for fixing it up!

Regards,

Tvrtko

> 
> ---
> Nathan Chancellor (2):
>        drm/panic: Ensure drm_panic_type is initialized to a valid value
>        drm/panic: Fix expected string for QR_CODE in drm_panic_type_map
> 
>   drivers/gpu/drm/drm_panic.c | 11 +++++++----
>   1 file changed, 7 insertions(+), 4 deletions(-)
> ---
> base-commit: 349d4efadc1f831ebc0b872ba1e3a2b7dd58b72b
> change-id: 20260105-drm_panic-handle-invalid-drm_panic_screen-097e49e21c49
> 
> Best regards,
> --
> Nathan Chancellor <nathan@kernel.org>
>