linux-stable/drivers
Zeng Heng 5427d904e3 PCI: Check for alloc failure in pci_request_irq()
[ Upstream commit 2d9cd957d4 ]

When kvasprintf() fails to allocate memory, it returns a NULL pointer.
Return error from pci_request_irq() so we don't dereference it.

[bhelgaas: commit log]
Fixes: 704e8953d3 ("PCI/irq: Add pci_request_irq() and pci_free_irq() helpers")
Link: https://lore.kernel.org/r/20221121020029.3759444-1-zengheng4@huawei.com
Signed-off-by: Zeng Heng <zengheng4@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-01-18 11:30:21 +01:00
..
accessibility
acpi ACPICA: Fix use-after-free in acpi_ut_copy_ipackage_to_ipackage() 2023-01-18 11:30:06 +01:00
amba
android
ata pata_ipx4xx_cf: Fix unsigned comparison with less than zero 2023-01-18 11:30:09 +01:00
atm
auxdisplay
base PM: runtime: Do not call __rpm_callback() from rpm_idle() 2023-01-18 11:30:07 +01:00
bcma
block drbd: remove call to memset before free device/resource/connection 2023-01-18 11:30:13 +01:00
bluetooth Bluetooth: hci_bcsp: don't call kfree_skb() under spin_lock_irqsave() 2023-01-18 11:30:20 +01:00
bus bus: sunxi-rsb: Support atomic transfers 2022-12-08 11:18:29 +01:00
cdrom
char tpm/tpm_crb: Fix error message in __crb_relinquish_locality() 2023-01-18 11:30:04 +01:00
clk clk: socfpga: use clk_hw_register for a5/c5 2023-01-18 11:30:18 +01:00
clocksource clocksource/drivers/sh_cmt: Make sure channel clock supply is enabled 2023-01-18 11:30:06 +01:00
connector
cpufreq cpufreq: amd_freq_sensitivity: Add missing pci_dev_put() 2023-01-18 11:30:06 +01:00
cpuidle cpuidle: dt: Return the correct numbers of parsed idle states 2023-01-18 11:30:04 +01:00
crypto
dax
dca
devfreq
dio
dma dmaengine: at_hdmac: Check return code of dma_async_device_register 2022-11-25 17:40:20 +01:00
dma-buf
edac
eisa
extcon
firewire
firmware
fmc
fpga
fsi
gnss
gpio gpio: amd8111: Fix PCI device reference count leak 2022-12-14 11:28:28 +01:00
gpu drm/amdgpu: Fix PCI device refcount leak in amdgpu_atrm_get_bios() 2023-01-18 11:30:14 +01:00
hid HID: hid-sensor-custom: set fixed size for custom attributes 2023-01-18 11:30:12 +01:00
hsi
hv Drivers: hv: vmbus: fix possible memory leak in vmbus_device_register() 2022-12-08 11:18:29 +01:00
hwmon hwmon: (coretemp) fix pci device refcount leak in nv1a_ram_new() 2022-12-08 11:18:33 +01:00
hwspinlock
hwtracing
i2c
ide
idle
iio iio: light: rpr0521: add missing Kconfig dependencies 2022-12-08 11:18:32 +01:00
infiniband RDMA/nldev: Return "-EAGAIN" if the cm_id isn't from expected port 2023-01-18 11:30:21 +01:00
input Input: elants_i2c - properly handle the reset GPIO when power is off 2023-01-18 11:30:12 +01:00
iommu iommu/vt-d: Fix PCI device refcount leak in dmar_dev_scope_init() 2022-12-08 11:18:34 +01:00
ipack
irqchip irqchip: gic-pm: Use pm_runtime_resume_and_get() in gic_probe() 2023-01-18 11:30:06 +01:00
isdn mISDN: fix misuse of put_device() in mISDN_register_device() 2022-11-25 17:40:24 +01:00
leds
lightnvm
macintosh
mailbox
mcb
md dm integrity: flush the journal on suspend 2022-12-08 11:18:31 +01:00
media media: coda: Add check for kmalloc 2023-01-18 11:30:17 +01:00
memory
memstick
message
mfd
misc misc/vmw_vmci: fix an infoleak in vmci_host_do_receive_datagram() 2022-11-25 17:40:28 +01:00
mmc mmc: mmci: fix return value check of mmc_add_host() 2023-01-18 11:30:16 +01:00
mtd mtd: maps: pxa2xx-flash: fix memory leak in probe 2023-01-18 11:30:12 +01:00
mux
net stmmac: fix potential division by 0 2023-01-18 11:30:20 +01:00
nfc nfc: st-nci: fix memory leaks in EVT_TRANSACTION 2022-12-08 11:18:30 +01:00
ntb
nubus
nvdimm
nvme nvme initialize core quirks before calling nvme_init_subsystem 2022-12-14 11:28:30 +01:00
nvmem
of of: property: decrement node refcount in of_fwnode_get_reference_args() 2022-12-08 11:18:32 +01:00
opp
oprofile
parisc
parport parport_pc: Avoid FIFO port location truncation 2022-11-25 17:40:23 +01:00
pci PCI: Check for alloc failure in pci_request_irq() 2023-01-18 11:30:21 +01:00
pcmcia
perf perf: arm_dsu: Fix hotplug callback leak in dsu_pmu_init() 2023-01-18 11:30:02 +01:00
phy
pinctrl pinctrl: pinconf-generic: add missing of_node_put() 2023-01-18 11:30:13 +01:00
platform platform/x86: mxm-wmi: fix memleak in mxm_wmi_call_mx[ds|mx]() 2023-01-18 11:30:07 +01:00
pnp PNP: fix name memory leak in pnp_alloc_dev() 2023-01-18 11:30:05 +01:00
power soc: ti: smartreflex: Fix PM disable depth imbalance in omap_sr_probe 2023-01-18 11:30:02 +01:00
powercap
pps
ps3
ptp
pwm
rapidio rapidio: devices: fix missing put_device in mport_cdev_open 2023-01-18 11:30:08 +01:00
ras
regulator regulator: core: fix module refcount leak in set_supply() 2023-01-18 11:30:14 +01:00
remoteproc
reset
rpmsg
rtc
s390 s390/dasd: fix no record found for raw_track_access 2022-12-08 11:18:30 +01:00
sbus
scsi scsi: scsi_debug: Fix a warning in resp_write_scat() 2023-01-18 11:30:21 +01:00
sfi
sh
siox siox: fix possible memory leak in siox_device_add() 2022-11-25 17:40:23 +01:00
slimbus slimbus: stream: correct presence rate frequencies 2022-11-25 17:40:25 +01:00
sn
soc drivers: soc: ti: knav_qmss_queue: Mark knav_acc_firmwares as static 2023-01-18 11:30:02 +01:00
soundwire
spi spi: spi-imx: Fix spi_bus_clk if requested clock is higher than input clock 2022-12-08 11:18:32 +01:00
spmi
ssb
staging speakup: fix a segfault caused by switching consoles 2022-11-25 17:40:26 +01:00
target scsi: target: tcm_loop: Fix possible name leak in tcm_loop_setup_hba_bus() 2022-11-25 17:40:28 +01:00
tc
tee
thermal
thunderbolt
tty serial: 8250: 8250_omap: Avoid RS485 RTS glitch on ->set_termios() 2022-12-08 11:18:31 +01:00
uio
usb usb: musb: remove extra check in musb_gadget_vbus_draw 2023-01-18 11:30:01 +01:00
uwb
vfio
vhost
video fbcon: Use kzalloc() in fbcon_prepare_logo() 2022-12-14 11:28:26 +01:00
virt
virtio
visorbus
vlynq
vme
w1
watchdog
xen xen/privcmd: Fix a possible warning in privcmd_ioctl_mmap_resource() 2023-01-18 11:30:07 +01:00
zorro
Kconfig
Makefile