diff options
author | Nicolin Chen <nicolinc@nvidia.com> | 2025-04-14 22:16:35 +0300 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2025-04-17 17:44:27 +0300 |
commit | 30a3f2f3e4bd6335b727c83c08a982d969752bc1 (patch) | |
tree | 609979e66f295df2610a75a735458a90bdb0027d /drivers/fpga/tests/fpga-bridge-test.c | |
parent | 8dee308e4c01dea48fc104d37f92d5b58c50b96c (diff) | |
download | linux-30a3f2f3e4bd6335b727c83c08a982d969752bc1.tar.xz |
iommu: Fix two issues in iommu_copy_struct_from_user()
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@nvidia.com
And Alok pointed out a typo at the same time:
https://lore.kernel.org/all/480536af-6830-43ce-a327-adbd13dc3f1d@oracle.com
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@vger.kernel.org
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Acked-by: Alok Tiwari <alok.a.tiwari@oracle.com>
Reviewed-by: Matthew R. Ochs <mochs@nvidia.com>
Link: https://lore.kernel.org/r/20250414191635.450472-1-nicolinc@nvidia.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/fpga/tests/fpga-bridge-test.c')
0 files changed, 0 insertions, 0 deletions