This is a note to let you know that I've just added the patch titled drm/amd/display: Add missing NULL pointer check within dpcd_extend_address_range to the 6.10-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: drm-amd-display-add-missing-null-pointer-check-withi.patch and it can be found in the queue-6.10 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit 0c5b2ed8845536761da66b1caa3d98336a25c15e Author: Hersen Wu <hersenxs.wu@xxxxxxx> Date: Mon Apr 22 16:22:44 2024 -0400 drm/amd/display: Add missing NULL pointer check within dpcd_extend_address_range [ Upstream commit 5524fa301ba649f8cf00848f91468e0ba7e4f24c ] [Why & How] ASSERT if return NULL from kcalloc. Reviewed-by: Alex Hung <alex.hung@xxxxxxx> Reviewed-by: Rodrigo Siqueira <rodrigo.siqueira@xxxxxxx> Acked-by: Tom Chung <chiahsuan.chung@xxxxxxx> Signed-off-by: Hersen Wu <hersenxs.wu@xxxxxxx> Tested-by: Daniel Wheeler <daniel.wheeler@xxxxxxx> Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dpcd.c b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dpcd.c index a72c898b64fa..584b9295a12a 100644 --- a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dpcd.c +++ b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dpcd.c @@ -165,6 +165,7 @@ static void dpcd_extend_address_range( *out_address = new_addr_range.start; *out_size = ADDRESS_RANGE_SIZE(new_addr_range.start, new_addr_range.end); *out_data = kcalloc(*out_size, sizeof(**out_data), GFP_KERNEL); + ASSERT(*out_data); } }