kernel-fxtec-pro1x/drivers/misc/vmw_vmci
Alex Dewar 0b02a43257 VMCI: check return value of get_user_pages_fast() for errors
[ Upstream commit 90ca6333fd65f318c47bff425e1ea36c0a5539f6 ]

In a couple of places in qp_host_get_user_memory(),
get_user_pages_fast() is called without properly checking for errors. If
e.g. -EFAULT is returned, this negative value will then be passed on to
qp_release_pages(), which expects a u64 as input.

Fix this by only calling qp_release_pages() when we have a positive
number returned.

Fixes: 06164d2b72 ("VMCI: queue pairs implementation.")
Signed-off-by: Alex Dewar <alex.dewar90@gmail.com>
Link: https://lore.kernel.org/r/20200825164522.412392-1-alex.dewar90@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-10-29 09:55:08 +01:00
..
Kconfig
Makefile
vmci_context.c VMCI: Fix integer overflow in VMCI handle arrays 2019-07-14 08:11:21 +02:00
vmci_context.h
vmci_datagram.c
vmci_datagram.h
vmci_doorbell.c VMCI: Release resource if the work is already queued 2019-09-06 10:22:20 +02:00
vmci_doorbell.h
vmci_driver.c VMCI: Resource wildcard match fixed 2018-11-13 11:08:34 -08:00
vmci_driver.h
vmci_event.c sched/headers: Prepare to use <linux/rcuupdate.h> instead of <linux/rculist.h> in <linux/sched.h> 2017-03-02 08:42:38 +01:00
vmci_event.h
vmci_guest.c vmw_vmci: handle the return value from pci_alloc_irq_vectors correctly 2017-03-16 17:32:21 +09:00
vmci_handle_array.c VMCI: Fix integer overflow in VMCI handle arrays 2019-07-14 08:11:21 +02:00
vmci_handle_array.h VMCI: Fix integer overflow in VMCI handle arrays 2019-07-14 08:11:21 +02:00
vmci_host.c vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
vmci_queue_pair.c VMCI: check return value of get_user_pages_fast() for errors 2020-10-29 09:55:08 +01:00
vmci_queue_pair.h
vmci_resource.c VMCI: Resource wildcard match fixed 2018-11-13 11:08:34 -08:00
vmci_resource.h
vmci_route.c
vmci_route.h