kernel_samsung_a53x/drivers/gpu/drm/gma500
Ma Ke cdd617c690 drm/gma500: fix null pointer dereference in cdv_intel_lvds_get_modes
commit cb520c3f366c77e8d69e4e2e2781a8ce48d98e79 upstream.

In cdv_intel_lvds_get_modes(), the return value of drm_mode_duplicate()
is assigned to mode, which will lead to a NULL pointer dereference on
failure of drm_mode_duplicate(). Add a check to avoid npd.

Cc: stable@vger.kernel.org
Fixes: 6a227d5fd6c4 ("gma500: Add support for Cedarview")
Signed-off-by: Ma Ke <make24@iscas.ac.cn>
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240709113311.37168-1-make24@iscas.ac.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-23 23:20:12 +01:00
..
accel_2d.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
backlight.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
blitter.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
blitter.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cdv_device.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cdv_device.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cdv_intel_crt.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cdv_intel_display.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cdv_intel_dp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cdv_intel_hdmi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cdv_intel_lvds.c drm/gma500: fix null pointer dereference in cdv_intel_lvds_get_modes 2024-11-23 23:20:12 +01:00
framebuffer.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
framebuffer.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gem.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gem.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gma_device.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gma_device.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gma_display.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gma_display.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gtt.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gtt.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
intel_bios.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
intel_bios.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
intel_gmbus.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
intel_i2c.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mdfld_device.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mdfld_dsi_dpi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mdfld_dsi_dpi.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mdfld_dsi_output.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mdfld_dsi_output.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mdfld_dsi_pkg_sender.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mdfld_dsi_pkg_sender.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mdfld_intel_display.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mdfld_output.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mdfld_output.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mdfld_tmd_vid.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mdfld_tpo_vid.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mid_bios.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mid_bios.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mmu.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mmu.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
oaktrail.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
oaktrail_crtc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
oaktrail_device.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
oaktrail_hdmi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
oaktrail_hdmi_i2c.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
oaktrail_lvds.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
oaktrail_lvds_i2c.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
opregion.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
opregion.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
power.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
power.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
psb_device.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
psb_device.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
psb_drv.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
psb_drv.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
psb_intel_display.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
psb_intel_drv.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
psb_intel_lvds.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
psb_intel_modes.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
psb_intel_reg.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
psb_intel_sdvo.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
psb_intel_sdvo_regs.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
psb_irq.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
psb_irq.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
psb_lid.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
psb_reg.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tc35876x-dsi-lvds.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tc35876x-dsi-lvds.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00