Skip to content
Commit 69848cd6 authored by Dan Carpenter's avatar Dan Carpenter Committed by Alex Williamson
Browse files

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: 67247289 ("vfio/fsl-mc: Allow userspace to MMAP fsl-mc device MMIO regions")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarDiana Craciun <diana.craciun@oss.nxp.com>
Signed-off-by: default avatarAlex Williamson <alex.williamson@redhat.com>
parent 09699e56
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment