diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2020-10-23 14:29:47 +0300 |
---|---|---|
committer | Alex Williamson <alex.williamson@redhat.com> | 2020-11-03 11:07:19 -0700 |
commit | 69848cd6f0c1fb4f82ab255b730343a215ded013 (patch) | |
tree | 42e2f57377c275cef4d7dfc99dfdef983f5a2771 /drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | |
parent | 09699e56dee946a16767021af97411ed6f4b3e6b (diff) |
vfio/fsl-mc: prevent underflow in vfio_fsl_mc_mmap()
My static analsysis tool complains that the "index" can be negative.
There are some checks in do_mmap() which try to prevent underflows but
I don't know if they are sufficient for this situation. Either way,
making "index" unsigned is harmless so let's do it just to be safe.
Fixes: 67247289688d ("vfio/fsl-mc: Allow userspace to MMAP fsl-mc device MMIO regions")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Diana Craciun <diana.craciun@oss.nxp.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c')
0 files changed, 0 insertions, 0 deletions