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: 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>
2020-06-22 12:34:21 -04:00
..
2020-04-01 12:06:26 -04:00
2020-04-02 10:41:40 -04:00
2020-06-10 13:42:09 -07:00
2020-06-10 13:42:09 -07:00
2020-06-09 06:42:06 -04:00