TencentOS-kernel/drivers
Souptick Joarder fdbc02073d drivers/virt/fsl_hypervisor: Fix error handling path
[ Upstream commit 7f360bec37857bfd5a48cef21d86f58a09a3df63 ]

First, when memory allocation for sg_list_unaligned failed, there
is a bug of calling put_pages() as we haven't pinned any pages.

Second, if get_user_pages_fast() failed we should unpin num_pinned
pages.

This will address both.

As part of these changes, minor update in documentation.

Fixes: 6db7199407ca ("drivers/virt: introduce Freescale hypervisor management driver")
Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: John Hubbard <jhubbard@nvidia.com>
Link: https://lore.kernel.org/r/1598995271-6755-1-git-send-email-jrdr.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-03-16 16:38:36 +08:00
..
accessibility Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
acpi ACPI: Always build evged in 2021-03-16 16:38:08 +08:00
amba Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
android binder: Remove bogus warning on failed same-process transaction 2021-03-16 16:38:35 +08:00
ata ata: sata_mv, avoid trigerrable BUG_ON 2021-03-16 16:37:41 +08:00
atm atm: eni: fix the missed pci_disable_device() for eni_init_one() 2021-03-16 16:37:33 +08:00
auxdisplay Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
base driver core: Fix probe_count imbalance in really_probe() 2021-03-16 16:37:56 +08:00
bcma Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
block rbd: require global CAP_SYS_ADMIN for mapping and unmapping 2021-03-16 16:36:06 +08:00
bluetooth Bluetooth: hci_uart: Cancel init work before unregistering 2021-03-16 16:38:31 +08:00
bus bus: hisi_lpc: Fixup IO ports addresses to avoid use-after-free in host removal 2021-03-16 16:36:56 +08:00
cdrom Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
char ipmi:bt-bmc: Fix error handling and status check 2021-03-16 16:37:18 +08:00
clk clk: samsung: exynos4: mark 'chipid' clock as CLK_IGNORE_UNUSED 2021-03-16 16:37:48 +08:00
clocksource clocksource/drivers/timer-gx6605s: Fixup counter reload 2021-03-16 16:37:44 +08:00
connector Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
counter counter: 104-quad-8: Add lock guards - generic interface 2021-03-16 16:27:07 +08:00
cpufreq cpufreq: powernv: Fix frame-size-overflow in powernv_cpufreq_work_fn 2021-03-16 16:37:05 +08:00
cpuidle cpuidle: Fixup IRQ state 2021-03-16 16:35:25 +08:00
crypto cypto: mediatek - fix leaks in mtk_desc_ring_alloc 2021-03-16 16:38:27 +08:00
dax dax: Fix alloc_dax_region() compile warning 2021-03-16 16:36:36 +08:00
dca Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
devfreq PM / devfreq: tegra30: Fix integer overflow on CPU's freq max out 2021-03-16 16:36:35 +08:00
dio Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
dma dmaengine: tegra-apb: Prevent race conditions on channel's freeing 2021-03-16 16:36:55 +08:00
dma-buf dmabuf: fix NULL pointer dereference in dma_buf_release() 2021-03-16 16:37:40 +08:00
edac EDAC/ti: Fix handling of platform_get_irq() error 2021-03-16 16:38:22 +08:00
eisa Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
extcon extcon: adc-jack: Fix an error handling path in 'adc_jack_probe()' 2021-03-16 16:30:26 +08:00
firewire Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
firmware firmware: arm_sdei: Use cpus_read_lock() to avoid races with cpuhp 2021-03-16 16:36:56 +08:00
fpga fpga: dfl: fix bug in port reset handshake 2021-03-16 16:32:23 +08:00
fsi Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
gnss gnss: sirf: fix error return code in sirf_probe() 2021-03-16 16:29:47 +08:00
gpio gpio: aspeed: fix ast2600 bank properties 2021-03-16 16:37:49 +08:00
gpu drm/crc-debugfs: Fix memleak in crc_control_write 2021-03-16 16:38:35 +08:00
greybus Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
hid HID: elan: Fix memleak in elan_input_configured 2021-03-16 16:35:58 +08:00
hsi Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
hv Drivers: hv: vmbus: Add timeout to vmbus_wait_for_unload 2021-03-16 16:36:17 +08:00
hwmon hwmon: (pmbus/max34440) Fix status register reads for MAX344{51,60,61} 2021-03-16 16:38:27 +08:00
hwspinlock Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
hwtracing coresight: etm4x: Fix use-after-free of per-cpu etm drvdata 2021-03-16 16:37:19 +08:00
i2c i2c: owl: Clear NACK and BUS error bits 2021-03-16 16:38:00 +08:00
i3c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
ide Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
idle Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
iio iio: adc: qcom-spmi-adc5: fix driver name 2021-03-16 16:37:43 +08:00
infiniband IB/iser: Always check sig MR before putting it to the free pool 2021-03-16 16:37:08 +08:00
input Input: ati_remote2 - add missing newlines when printing module parameters 2021-03-16 16:38:07 +08:00
interconnect Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
iommu iommu/vt-d: Fix lockdep splat in iommu_flush_dev_iotlb() 2021-03-16 16:38:01 +08:00
ipack ipack: tpci200: fix error return code in tpci200_register() 2021-03-16 16:28:19 +08:00
irqchip irqchip/stm32-exti: Avoid losing interrupts due to clearing pending bits by mistake 2021-03-16 16:35:14 +08:00
isdn Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
leds leds: mlxreg: Fix possible buffer overflow 2021-03-16 16:36:35 +08:00
lightnvm Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
macintosh macintosh/via-macii: Access autopoll_devs when inside lock 2021-03-16 16:33:39 +08:00
mailbox mailbox: zynqmp-ipi: Fix NULL vs IS_ERR() check in zynqmp_ipi_mbox_probe() 2021-03-16 16:30:27 +08:00
mcb Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
md dm: fix bio splitting and its bio completion order for regular IO 2021-03-16 16:37:41 +08:00
media media: ti-vpe: Fix a missing check and reference count leak 2021-03-16 16:38:29 +08:00
memory Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
memstick memstick: Skip allocating card when removing host 2021-03-16 16:37:44 +08:00
message scsi: mptscsih: Fix read sense data size 2021-03-16 16:31:28 +08:00
mfd mfd: mfd-core: Protect against NULL call-back function pointer 2021-03-16 16:36:37 +08:00
misc VMCI: check return value of get_user_pages_fast() for errors 2021-03-16 16:38:34 +08:00
mmc mmc: core: don't set limits.discard_granularity as 0 2021-03-16 16:38:06 +08:00
mtd ubi: fastmap: Free unused fastmap anchor peb during detach 2021-03-16 16:37:28 +08:00
mux Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
net mwifiex: Do not use GFP_KERNEL in atomic context 2021-03-16 16:38:33 +08:00
nfc NFC: st95hf: Fix memleak in st95hf_in_send_cmd 2021-03-16 16:35:54 +08:00
ntb NTB: perf: Fix race condition when run with ntb_test 2021-03-16 16:30:32 +08:00
nubus Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
nvdimm libnvdimm/security: ensure sysfs poll thread woke up and fetch updated attr 2021-03-16 16:34:18 +08:00
nvme nvme-pci: disable the write zeros command for Intel 600P/P3100 2021-03-16 16:38:16 +08:00
nvmem nvmem: qfprom: remove incorrect write support 2021-03-16 16:28:52 +08:00
of of: of_mdio: Correct loop scanning logic 2021-03-16 16:31:51 +08:00
opp opp: Increase parsed_static_opps in _of_add_opp_table_v1() 2021-03-16 16:37:28 +08:00
oprofile Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
parisc parisc: mask out enable and reserved bits from sba imask 2021-03-16 16:33:54 +08:00
parport Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
pci PCI: tegra: Fix runtime PM imbalance on error 2021-03-16 16:37:24 +08:00
pcmcia Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
perf drivers/perf: thunderx2_pmu: Fix memory resource error handling 2021-03-16 16:38:23 +08:00
phy phy: ti: am654: Fix a leak in serdes_am654_probe() 2021-03-16 16:37:48 +08:00
pinctrl pinctrl: bcm: fix kconfig dependency warning when !GPIOLIB 2021-03-16 16:38:30 +08:00
platform platform/x86: fix kconfig dependency warning for FUJITSU_LAPTOP 2021-03-16 16:38:02 +08:00
pnp Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
power power: supply: max17040: Correct voltage reading 2021-03-16 16:37:16 +08:00
powercap Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
pps Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
ps3 Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
ptp Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
pwm pwm: lpss: Add range limit check for the base_unit register value 2021-03-16 16:38:36 +08:00
rapidio rapidio: avoid data race between file operation callbacks and mport_cdev_add(). 2021-03-16 16:37:25 +08:00
ras Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
regulator regulator: resolve supply after creating regulator 2021-03-16 16:38:29 +08:00
remoteproc remoteproc: qcom_q6v5_mss: Validate modem blob firmware size before load 2021-03-16 16:34:10 +08:00
reset Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
rpmsg Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
rtc rtc: ds1374: fix possible race condition 2021-03-16 16:37:01 +08:00
s390 s390/zcrypt: Fix ZCRYPT_PERDEV_REQCNT ioctl 2021-03-16 16:37:40 +08:00
sbus Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
scsi scsi: csiostor: Fix wrong return value in csio_hw_prep_fw() 2021-03-16 16:38:34 +08:00
sfi Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
sh Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
siox Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
slimbus slimbus: core: Fix mismatch in of_node_get/put 2021-03-16 16:32:05 +08:00
soc soc: qcom: rpmh-rsc: Set suppress_bind_attrs flag 2021-03-16 16:33:19 +08:00
soundwire soundwire: bus: disable pm_runtime in sdw_slave_delete 2021-03-16 16:36:55 +08:00
spi spi: spi-s3c64xx: Check return values 2021-03-16 16:38:30 +08:00
spmi Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
ssb Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
staging staging: emxx_udc: Fix passing of NULL to dma_alloc_coherent() 2021-03-16 16:38:34 +08:00
target scsi: target: iscsi: Fix hang in iscsit_access_np() when getting tpg->np_login_sem 2021-03-16 16:36:05 +08:00
tc Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
tee Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
thermal thermal: rcar_thermal: Handle probe error gracefully 2021-03-16 16:37:03 +08:00
thunderbolt Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
tty pty: do tty_flip_buffer_push without port->lock in pty_write 2021-03-16 16:38:35 +08:00
uio uio_pdrv_genirq: fix use without device tree and no interrupt 2021-03-16 16:32:12 +08:00
usb USB: serial: ftdi_sio: add support for FreeCalypso JTAG+UART adapters 2021-03-16 16:38:10 +08:00
vfio vfio/pci: fix racy on error and request eventfd ctx 2021-03-16 16:37:27 +08:00
vhost vhost: Use vhost_get_used_size() in vhost_vring_set_addr() 2021-03-16 16:37:54 +08:00
video backlight: sky81452-backlight: Fix refcount imbalance on error 2021-03-16 16:38:34 +08:00
virt drivers/virt/fsl_hypervisor: Fix error handling path 2021-03-16 16:38:36 +08:00
virtio virtio_ring: Avoid loop when vq is broken in virtqueue_poll 2021-03-16 16:34:34 +08:00
visorbus Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
vlynq Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
vme Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
w1 w1: omap-hdq: cleanup to add missing newline for some dev_dbg 2021-03-16 16:29:53 +08:00
watchdog watchdog: initialize device before misc_register 2021-03-16 16:34:19 +08:00
xen xen/events: don't use chip_data for legacy IRQs 2021-03-16 16:38:11 +08:00
zorro Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
Kconfig Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
Makefile Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00