WSL2-Linux-Kernel/drivers/misc/vmw_vmci
Alex Dewar 90ca6333fd VMCI: check return value of get_user_pages_fast() for errors
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>
2020-08-28 12:31:39 +02:00
..
Kconfig
Makefile
vmci_context.c
vmci_context.h
vmci_datagram.c
vmci_datagram.h
vmci_doorbell.c
vmci_doorbell.h
vmci_driver.c
vmci_driver.h
vmci_event.c
vmci_event.h
vmci_guest.c
vmci_handle_array.c
vmci_handle_array.h
vmci_host.c
vmci_queue_pair.c
vmci_queue_pair.h
vmci_resource.c
vmci_resource.h
vmci_route.c
vmci_route.h