linux/drivers/misc
Alex Dewar 0b02a43257 VMCI: check return value of get_user_pages_fast() for errors
[ Upstream commit 90ca6333fd ]

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
..
altera-stapl altera-stapl: altera_get_note: prevent write beyond end of 'key' 2020-03-25 08:06:07 +01:00
c2port
cardreader misc: rtsx: Add short delay after exit from ASPM 2020-05-27 17:37:43 +02:00
cb710
cxl cxl: Fix kobject memleak 2020-08-19 08:14:55 +02:00
echo misc: echo: Remove unnecessary parentheses and simplify check for zero 2020-04-17 10:48:55 +02:00
eeprom
genwqe misc: genwqe: should return proper error value. 2019-11-20 18:47:31 +01:00
ibmasm
lis3lv02d
lkdtm
mei mei: bus: don't clean driver pointer 2020-07-22 09:32:11 +02:00
mic mic: avoid statically declaring a 'struct device'. 2020-01-27 14:51:02 +01:00
ocxl
sgi-gru
sgi-xp misc: sgi-xp: Properly initialize buf in xpc_get_rsvd_page_pa 2020-01-27 14:50:51 +01:00
ti-st
vmw_vmci VMCI: check return value of get_user_pages_fast() for errors 2020-10-29 09:55:08 +01:00
ad525x_dpot-i2c.c
ad525x_dpot-spi.c
ad525x_dpot.c
ad525x_dpot.h
apds990x.c
apds9802als.c
aspeed-lpc-ctrl.c
aspeed-lpc-snoop.c soc: aspeed: Fix snoop_file_poll()'s return type 2020-01-27 14:49:53 +01:00
atmel_tclib.c
atmel-ssc.c misc: atmel-ssc: lock with mutex instead of spinlock 2020-07-22 09:32:12 +02:00
bh1770glc.c
cs5535-mfgpt.c
ds1682.c
dummy-irq.c
enclosure.c scsi: enclosure: Fix stale device oops with hot replug 2020-01-17 19:47:03 +01:00
fsa9480.c
hmc6352.c
hpilo.c
hpilo.h
ibmvmc.c
ibmvmc.h
ics932s401.c
ioc4.c
isl29003.c
isl29020.c
Kconfig
kgdbts.c misc: kgdbts: Fix restrict error 2019-11-20 18:47:31 +01:00
lattice-ecp3-config.c
Makefile
pch_phub.c PCI: Move Rohm Vendor ID to generic list 2020-06-22 09:05:23 +02:00
pci_endpoint_test.c PCI: Add Synopsys endpoint EDDA Device ID 2020-06-22 09:05:24 +02:00
phantom.c
pti.c
qcom-coincell.c
spear13xx_pcie_gadget.c
sram-exec.c
sram.c
sram.h
tifm_7xx1.c
tifm_core.c
tsl2550.c
vexpress-syscfg.c
vmw_balloon.c