]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/panic: Fix qr_code, ensure vmargin is positive
authorJocelyn Falempe <jfalempe@redhat.com>
Thu, 9 Oct 2025 12:24:50 +0000 (14:24 +0200)
committerJocelyn Falempe <jfalempe@redhat.com>
Tue, 21 Oct 2025 09:28:03 +0000 (11:28 +0200)
commit4fcffb5e5c8c0c8e2ad9c99a22305a0afbecc294
tree789dc5bec6fe497a88870939ac8cbd3f2e41c49c
parentcfa56e0a0e9b259077b0cb88b431e37dc9a67dee
drm/panic: Fix qr_code, ensure vmargin is positive

Depending on qr_code size and screen size, the vertical margin can
be negative, that means there is not enough room to draw the qr_code.

So abort early, to avoid a segfault by trying to draw at negative
coordinates.

Fixes: cb5164ac43d0f ("drm/panic: Add a QR code panic screen")
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://lore.kernel.org/r/20251009122955.562888-4-jfalempe@redhat.com
Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com>
drivers/gpu/drm/drm_panic.c