[PATCH] fbdev: Check fb_add_videomode to prevent null-ptr-deref

2025-07-23 Thread Chenyuan Yang
17186f1f90d3 ("fbdev: Fix do_register_framebuffer to prevent null-ptr-deref in fb_videomode_to_var"). Fixes: 1b6c79361ba5 ("video: imxfb: Add DT support") Signed-off-by: Chenyuan Yang --- drivers/video/fbdev/imxfb.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-)

[PATCH] drm/amd/display: Add null pointer check in mod_hdcp_hdcp1_create_session()

2025-07-23 Thread Chenyuan Yang
() and return MOD_HDCP_STATUS_DISPLAY_NOT_FOUND if the function return null. This is similar to the commit c3e9826a2202 ("drm/amd/display: Add null pointer check for get_first_active_display()"). Fixes: 2deade5ede56 ("drm/amd/display: Remove hdcp display state with mst fix") Sig

Re: [PATCH] drm/msm/dpu: Add a null ptr check for dpu_encoder_needs_modeset

2025-07-23 Thread Chenyuan Yang
On Wed, Jul 23, 2025 at 12:05 PM Dmitry Baryshkov wrote: > > On Tue, Jul 22, 2025 at 04:17:40PM -0500, Chenyuan Yang wrote: > > The drm_atomic_get_new_connector_state() can return NULL if the > > connector is not part of the atomic state. Add a check to prevent > > a

Re: [PATCH] drm/bridge: Add null pointer check for ITE IT6263

2025-07-23 Thread Chenyuan Yang
Apologies for the second email. I am resending this message as the formatting in the previous version was incorrect On Tue, Jul 22, 2025 at 11:57 PM Maxime Ripard wrote: > > On Tue, Jul 22, 2025 at 03:41:14PM -0500, Chenyuan Yang wrote: > > drm_atomic_get_new_connector_for

Re: [PATCH] drm/bridge: Add null pointer check for ITE IT6263

2025-07-23 Thread Chenyuan Yang
On Tue, Jul 22, 2025 at 23:57 Maxime Ripard wrote: > On Tue, Jul 22, 2025 at 03:41:14PM -0500, Chenyuan Yang wrote: > > drm_atomic_get_new_connector_for_encoder and > > drm_atomic_get_new_connector_state could return Null. > > They can, but not in that scenario. atomic

[PATCH] drm/msm/dpu: Add a null ptr check for dpu_encoder_needs_modeset

2025-07-22 Thread Chenyuan Yang
. Signed-off-by: Chenyuan Yang Fixes: 1ce69c265a53 ("drm/msm/dpu: move resource allocation to CRTC") --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encod

[PATCH] drm/bridge: lt9211: Add null pointer check for LT9211

2025-07-22 Thread Chenyuan Yang
drm_atomic_get_new_connector_for_encoder and drm_atomic_get_new_connector_state could return Null. Thus, add the null pointer check for them with a similar format with lt9611_bridge_atomic_enable in LT9611. Signed-off-by: Chenyuan Yang --- drivers/gpu/drm/bridge/lontium-lt9211.c | 13

[PATCH] drm/bridge: Add null pointer check for ITE IT6263

2025-07-22 Thread Chenyuan Yang
drm_atomic_get_new_connector_for_encoder and drm_atomic_get_new_connector_state could return Null. Thus, add the null pointer check for them with a similar format with it6505_bridge_atomic_enable in ITE IT6505. Signed-off-by: Chenyuan Yang Fixes: 049723628716 ("drm/bridge: Add ITE IT6263 LV

[PATCH] drm/nouveau: Fix null pointer dereference

2025-04-12 Thread Chenyuan Yang
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. Signed-off-by: Chenyuan Yang Fixes: 6ee738610f41 ("drm/nouveau: Add DRM driver for NVIDIA GPUs") --- drivers/gpu/d

[PATCH] gma500/cdv: fix null pointer dereference in cdv_intel_dp_get_modes

2025-04-07 Thread Chenyuan Yang
ce in cdv_intel_lvds_get_modes"). This is found by our static analysis tool KNighter. Signed-off-by: Chenyuan Yang Fixes: d112a8163f83 ("gma500/cdv: Add eDP support") --- drivers/gpu/drm/gma500/cdv_intel_dp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/gma5

[PATCH] drm/sun4i: backend: Fix error pointers in sun4i_backend_atomic_check

2025-03-15 Thread Chenyuan Yang
dereferencing them. Similar to commit da29abe71e16 ("drm/amd/display: Fix error pointers in amdgpu_dm_crtc_mem_type_changed"). Fixes: 96180dde23b7 ("drm/sun4i: backend: Add a custom atomic_check for the frontend") Signed-off-by: Chenyuan Yang --- drivers/gpu/drm/sun4i/sun4i_b

Re: [PATCH] drm/sun4i: backend: Fix error pointers in sun4i_backend_atomic_check

2025-03-15 Thread Chenyuan Yang
fb; if (!sun4i_backend_plane_is_supported(plane_state, &layer_state->uses_frontend)) -- -Chenyuan On Fri, Mar 14, 2025 at 2:17 AM Maxime Ripard wrote: > > Hi, > > On Thu, Mar 13, 2025 at 08:20:29PM -0500, Chenyuan Yang wrote: > > The function sun4i_back

[PATCH] drm/msm/dpu: Fix error pointers in dpu_plane_virtual_atomic_check

2025-03-14 Thread Chenyuan Yang
before dereferencing them. Similar to commit da29abe71e16 ("drm/amd/display: Fix error pointers in amdgpu_dm_crtc_mem_type_changed"). Fixes: 774bcfb73176 ("drm/msm/dpu: add support for virtual planes") Signed-off-by: Chenyuan Yang --- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 3