On Thu, Jan 16, 2025 at 02:17:26PM +0800, Frank.C wrote: > From: Srinivasan Shanmugam <srinivasan.shanmugam@xxxxxxx> > > [ Upstream commit ac2140449184a26eac99585b7f69814bd3ba8f2d ] > > This commit addresses a potential null pointer dereference issue in the > `dcn32_acquire_idle_pipe_for_head_pipe_in_layer` function. The issue > could occur when `head_pipe` is null. > > The fix adds a check to ensure `head_pipe` is not null before asserting > it. If `head_pipe` is null, the function returns NULL to prevent a > potential null pointer dereference. > > Reported by smatch: > drivers/gpu/drm/amd/amdgpu/../display/dc/resource/dcn32/dcn32_resource.c:2690 dcn32_acquire_idle_pipe_for_head_pipe_in_layer() error: we previously assumed 'head_pipe' could be null (see line 2681) > > Cc: Tom Chung <chiahsuan.chung@xxxxxxx> > Cc: Rodrigo Siqueira <Rodrigo.Siqueira@xxxxxxx> > Cc: Roman Li <roman.li@xxxxxxx> > Cc: Alex Hung <alex.hung@xxxxxxx> > Cc: Aurabindo Pillai <aurabindo.pillai@xxxxxxx> > Cc: Harry Wentland <harry.wentland@xxxxxxx> > Cc: Hamza Mahfooz <hamza.mahfooz@xxxxxxx> > Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@xxxxxxx> > Reviewed-by: Tom Chung <chiahsuan.chung@xxxxxxx> > Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx> > Signed-off-by: Frank.C <tom.and.jerry.official.mail@xxxxxxxxx> I need a real name here, sorry. greg k-h