linux_dsm_epyc7002/drivers/vhost
Dan Carpenter c09cc2c319 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: ddd89d0a05 ("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>
2020-06-22 12:34:21 -04:00
..
iotlb.c vhost: factor out IOTLB 2020-04-01 12:06:26 -04:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile vhost: introduce vDPA-based backend 2020-04-02 10:41:40 -04:00
net.c virtio: features, fixes 2020-06-10 13:42:09 -07:00
scsi.c virtio: features, fixes 2020-06-10 13:42:09 -07:00
test.c vhost/test: fix up after API change 2020-06-09 06:42:06 -04:00
test.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
vdpa.c vhost_vdpa: Fix potential underflow in vhost_vdpa_mmap() 2020-06-22 12:34:21 -04:00
vhost.c Merge branch 'akpm' (patches from Andrew) 2020-06-11 13:25:53 -07:00
vhost.h vhost: allow device that does not depend on vhost worker 2020-06-04 15:36:51 -04:00
vringh.c virtio: force spec specified alignment on types 2020-06-02 02:45:13 -04:00
vsock.c vhost: allow device that does not depend on vhost worker 2020-06-04 15:36:51 -04:00