diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2025-06-17 16:09:34 +0200 |
---|---|---|
committer | Thomas Zimmermann <tzimmermann@suse.de> | 2025-06-27 16:00:49 +0200 |
commit | 615cc4223fcbe1e0e6f68b8494b26bb6c08d917a (patch) | |
tree | 6cb91ec4b106cb7c965573839f5b9c90f5bd7a8e /scripts/lib/kdoc/kdoc_parser.py | |
parent | f6faebc11a8a6d9521e5ab00481bd22ed9c7c67d (diff) |
drm/vesadrm: Avoid NULL-ptr deref in vesadrm_pmi_cmap_write()
Only set PMI fields if the screen_info's Vesa PM segment has been
set. Vesa PMI is the power-management interface. It also provides
means to set the color palette. The interface is optional, so not
all VESA graphics cards support it. Print vesafb's warning [1] if
the hardware palette cannot be set at all.
If unsupported the field PrimaryPalette in struct vesadrm.pmi is
NULL, which results in a segmentation fault. Happens with qemu's
Cirrus emulation.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Fixes: 814d270b31d2 ("drm/sysfb: vesadrm: Add gamma correction")
Link: https://elixir.bootlin.com/linux/v6.15/source/drivers/video/fbdev/vesafb.c#L375 # 1
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Javier Martinez Canillas <javierm@redhat.com>
Cc: dri-devel@lists.freedesktop.org
Acked-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://lore.kernel.org/r/20250617140944.142392-1-tzimmermann@suse.de
Diffstat (limited to 'scripts/lib/kdoc/kdoc_parser.py')
0 files changed, 0 insertions, 0 deletions