Re: [PATCH] drm/msm: Adjust msm_iommu_pagetable_prealloc_allocate() allocation type
From: Dmitry Baryshkov
Date: Sat Feb 07 2026 - 04:13:33 EST
On Fri, Feb 06, 2026 at 02:21:52PM -0800, Kees Cook wrote:
> In preparation for making the kmalloc family of allocators type aware,
> we need to make sure that the returned type from the allocation matches
> the type of the variable being assigned. (Before, the allocator would
> always return "void *", which can be implicitly cast to any pointer type.)
>
> The assigned type is "void **" but the returned type will be "void ***".
> These are the same allocation size (pointer size), but the types do not
> match. Adjust the allocation type to match the assignment.
>
> Signed-off-by: Kees Cook <kees@xxxxxxxxxx>
> ---
> Cc: Rob Clark <robin.clark@xxxxxxxxxxxxxxxx>
> Cc: Dmitry Baryshkov <lumag@xxxxxxxxxx>
> Cc: Abhinav Kumar <abhinav.kumar@xxxxxxxxx>
> Cc: Jessica Zhang <jesszhan0024@xxxxxxxxx>
> Cc: Sean Paul <sean@xxxxxxxxxx>
> Cc: Marijn Suijten <marijn.suijten@xxxxxxxxxxxxxx>
> Cc: David Airlie <airlied@xxxxxxxxx>
> Cc: Simona Vetter <simona@xxxxxxxx>
> Cc: <linux-arm-msm@xxxxxxxxxxxxxxx>
> Cc: <dri-devel@xxxxxxxxxxxxxxxxxxxxx>
> Cc: <freedreno@xxxxxxxxxxxxxxxxxxxxx>
> ---
> drivers/gpu/drm/msm/msm_iommu.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx>
--
With best wishes
Dmitry