Commit 07f5d021 authored by Jocelyn Falempe's avatar Jocelyn Falempe Committed by Greg Kroah-Hartman
Browse files

drm/panic: Fix qr_code, ensure vmargin is positive



[ Upstream commit 4fcffb5e ]

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: cb5164ac ("drm/panic: Add a QR code panic screen")
Reviewed-by: default avatarJavier Martinez Canillas <javierm@redhat.com>
Link: https://lore.kernel.org/r/20251009122955.562888-4-jfalempe@redhat.com


Signed-off-by: default avatarJocelyn Falempe <jfalempe@redhat.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 9630c168
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment