diff options
| author | Dan Carpenter <[email protected]> | 2020-10-23 11:29:47 +0000 |
|---|---|---|
| committer | Alex Williamson <[email protected]> | 2020-11-03 18:07:19 +0000 |
| commit | 69848cd6f0c1fb4f82ab255b730343a215ded013 (patch) | |
| tree | 42e2f57377c275cef4d7dfc99dfdef983f5a2771 /drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | |
| parent | vfio/fsl-mc: return -EFAULT if copy_to_user() fails (diff) | |
| download | kernel-69848cd6f0c1fb4f82ab255b730343a215ded013.tar.gz kernel-69848cd6f0c1fb4f82ab255b730343a215ded013.zip | |
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 <[email protected]>
Acked-by: Diana Craciun <[email protected]>
Signed-off-by: Alex Williamson <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c')
0 files changed, 0 insertions, 0 deletions
