RE: [PATCH rc] iommu: Fix two issues in iommu_copy_struct_from_user()
From: Tian, Kevin
Date: Tue Apr 15 2025 - 02:27:51 EST
> From: Nicolin Chen <nicolinc@xxxxxxxxxx>
> Sent: Tuesday, April 15, 2025 3:17 AM
>
> In the review for iommu_copy_struct_to_user() helper, Matt pointed out
> that
> a NULL pointer should be rejected prior to dereferencing it:
> https://lore.kernel.org/all/86881827-8E2D-461C-BDA3-
> FA8FD14C343C@xxxxxxxxxx
>
> And Alok pointed out a typo at the same time:
> https://lore.kernel.org/all/480536af-6830-43ce-a327-
> adbd13dc3f1d@xxxxxxxxxx
>
> Since both issues were copied from iommu_copy_struct_from_user(), fix
> them
> first in the current header.
>
> Fixes: e9d36c07bb78 ("iommu: Add iommu_copy_struct_from_user helper")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Nicolin Chen <nicolinc@xxxxxxxxxx>
Reviewed-by: Kevin Tian <kevin.tian@xxxxxxxxx>