summaryrefslogtreecommitdiff
path: root/drivers/virtio
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2020-06-10 11:58:52 +0300
committerMichael S. Tsirkin <mst@redhat.com>2020-06-22 19:34:21 +0300
commitc09cc2c319863f620caf5e723db496eed55f7c7f (patch)
treea4e02555cb4414ee5a511125fbd063adafa31785 /drivers/virtio
parent24eae8ebfb29ca54980764245ffb8aa218666ff6 (diff)
downloadlinux-c09cc2c319863f620caf5e723db496eed55f7c7f.tar.xz
vhost_vdpa: Fix potential underflow in vhost_vdpa_mmap()
The "vma->vm_pgoff" variable is an unsigned long so if it's larger than INT_MAX then "index" can be negative leading to an underflow. Fix this by changing the type of "index" to "unsigned long". Fixes: ddd89d0a059d ("vhost_vdpa: support doorbell mapping via mmap") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/20200610085852.GB5439@mwanda Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers/virtio')
0 files changed, 0 insertions, 0 deletions