sst-linux/drivers
Haoxiang Li a5f5e520e8 rapidio: fix an API misues when rio_add_net() fails
commit b2ef51c74b0171fde7eb69b6152d3d2f743ef269 upstream.

rio_add_net() calls device_register() and fails when device_register()
fails.  Thus, put_device() should be used rather than kfree().  Add
"mport->net = NULL;" to avoid a use after free issue.

Link: https://lkml.kernel.org/r/20250227073409.3696854-1-haoxiang_li2024@163.com
Fixes: e8de370188 ("rapidio: add mport char device driver")
Signed-off-by: Haoxiang Li <haoxiang_li2024@163.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Cc: Alexandre Bounine <alex.bou9@gmail.com>
Cc: Matt Porter <mporter@kernel.crashing.org>
Cc: Yang Yingliang <yangyingliang@huawei.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-03-13 12:53:15 +01:00
..
accessibility
acpi ACPI: PRM: Remove unnecessary strict handler address checks 2025-02-21 13:49:47 +01:00
amba
android
ata ata: libata-sff: Ensure that we cannot write outside the allocated buffer 2025-02-21 13:49:49 +01:00
atm
auxdisplay
base regmap-irq: Add missing kfree() 2025-02-21 13:50:05 +01:00
bcma
block nbd: don't allow reconnect after disconnect 2025-02-21 13:48:53 +01:00
bluetooth Bluetooth: qca: Fix poor RF performance for WCN6855 2025-03-07 16:56:30 +01:00
bus bus: mhi: host: pci_generic: Fix the name for the Telit FE990A 2024-10-17 15:21:20 +02:00
cdrom
char tpm: Change to kvalloc() in eventlog/acpi.c 2025-03-07 16:56:31 +01:00
clk clk: mediatek: mt2701-img: add missing dummy clk 2025-03-07 16:56:30 +01:00
clocksource x86/i8253: Disable PIT timer 0 when not in use 2025-02-21 13:50:12 +01:00
comedi comedi: Flush partial mappings in error case 2024-12-14 19:53:59 +01:00
connector
counter counter: ti-ecap-capture: Add check for clk_enable() 2024-12-14 19:53:53 +01:00
cpufreq cpufreq: s3c64xx: Fix compilation warning 2025-02-21 13:49:38 +01:00
cpuidle cpuidle: riscv-sbi: fix device node release in early exit of for_each_possible_cpu 2025-01-17 13:34:41 +01:00
crypto crypto: qce - unregister previously registered algos in error path 2025-02-21 13:49:49 +01:00
cxl cxl/region: Fix region creation for greater than x2 switches 2024-12-27 13:52:53 +01:00
dax dax: delete a stale directory pmem 2024-12-14 19:53:41 +01:00
dca
devfreq
dio
dma dmaengine: ti: edma: fix OF node reference leaks in edma_driver 2025-02-21 13:49:21 +01:00
dma-buf udmabuf: also check for F_SEAL_FUTURE_WRITE 2024-12-27 13:53:01 +01:00
edac EDAC/qcom: Correct interrupt enable register configuration 2025-03-07 16:56:40 +01:00
eisa
extcon
firewire
firmware efi: Avoid cold plugged memory for placing the kernel 2025-02-21 13:50:04 +01:00
fpga fpga: manager: add owner module and take its refcount 2024-12-14 19:53:12 +01:00
fsi
gnss
gpio gpio: aggregator: protect driver attr handlers against module unload 2025-03-13 12:53:12 +01:00
gpu drm/radeon: Fix rs400_gpu_init for ATI mobility radeon Xpress 200M 2025-03-13 12:53:13 +01:00
greybus
hid HID: appleir: Fix potential NULL dereference at raw event handle 2025-03-13 12:53:12 +01:00
hsi
hte
hv Drivers: hv: util: Avoid accessing a ringbuffer not initialized yet 2024-12-27 13:52:59 +01:00
hwmon hwmon: (tmp513) Fix division of negative numbers 2025-01-23 17:17:10 +01:00
hwspinlock
hwtracing coresight: tmc: sg: Do not leak sg_table 2024-10-17 15:21:11 +02:00
i2c i2c: npcm: disable interrupt enable bit before devm_request_irq 2025-03-07 16:56:48 +01:00
i3c i3c: master: cdns: Fix use after free vulnerability in cdns_i3c_master Driver Due to Race Condition 2025-02-21 13:50:10 +01:00
idle cpuidle, intel_idle: Fix CPUIDLE_FLAG_IBRS 2025-03-13 12:53:11 +01:00
iio iio: light: as73211: fix channel handling in only-color triggered buffer 2025-02-21 13:49:48 +01:00
infiniband RDMA/mlx5: Fix bind QP error cleanup flow 2025-03-07 16:56:42 +01:00
input Input: xpad - add support for wooting two he (arm) 2025-02-01 18:30:11 +01:00
interconnect
iommu iommu/arm-smmu-v3: Clean up more on probe failure 2025-02-21 13:49:33 +01:00
ipack
irqchip irqchip/apple-aic: Only handle PMC interrupt as FIQ when configured so 2025-02-21 13:49:51 +01:00
isdn
leds leds: lp8860: Write full EEPROM, not only half of it 2025-02-21 13:49:38 +01:00
macintosh
mailbox mailbox: tegra-hsp: Clear mailbox before using message 2025-02-21 13:49:51 +01:00
mcb
md md/md-bitmap: Synchronize bitmap_get_stats() with bitmap lifetime 2025-03-07 16:56:28 +01:00
media media: mtk-vcodec: potential null pointer deference in SCP 2025-03-07 16:56:51 +01:00
memory memory: tegra20-emc: fix an OF node reference bug in tegra_emc_find_node_by_ram_code() 2025-02-21 13:49:12 +01:00
memstick
message scsi: fusion: Remove unused variable 'rc' 2024-12-14 19:53:40 +01:00
mfd mfd: lpc_ich: Add another Gemini Lake ISA bridge PCI device-id 2025-02-21 13:49:31 +01:00
misc misc: fastrpc: Fix copy buffer page size 2025-02-21 13:49:52 +01:00
mmc mmc: mtk-sd: Fix register settings for hs400(es) mode 2025-02-21 13:50:05 +01:00
most
mtd mtd: rawnand: cadence: fix incorrect device in dma_unmap_single 2025-03-07 16:56:40 +01:00
mux
net ibmvnic: Inspect header requirements before using scrq direct 2025-03-13 12:53:10 +01:00
nfc
ntb ntb: ntb_hw_switchtec: Fix use after free vulnerability in switchtec_ntb_remove due to race condition 2024-10-17 15:22:15 +02:00
nubus
nvdimm nvdimm: rectify the illogical code within nd_dax_probe() 2024-12-14 19:54:47 +01:00
nvme nvme/ioctl: add missing space in err message 2025-03-07 16:56:38 +01:00
nvmem nvmem: core: improve range check for nvmem_cell_write() 2025-02-21 13:49:50 +01:00
of Revert "of: reserved-memory: Fix using wrong number of cells to get property 'alignment'" 2025-03-13 12:53:11 +01:00
opp OPP: OF: Fix an OF node leak in _opp_add_static_v2() 2025-02-21 13:49:02 +01:00
parisc
parport parport_pc: add support for ASIX AX99100 2025-02-21 13:50:11 +01:00
pci PCI: switchtec: Add Microchip PCI100X device IDs 2025-02-21 13:49:59 +01:00
pcmcia
peci
perf perf/arm-cmn: Ensure port and device id bits are set properly 2024-12-14 19:54:09 +01:00
phy phy: exynos5-usbdrd: fix MPLL_MULTIPLIER and SSC_REFCLKSEL masks in refclk 2025-03-07 16:56:50 +01:00
pinctrl pinctrl: cy8c95x0: Respect IRQ trigger settings from firmware 2025-02-21 13:49:56 +01:00
platform platform/x86: thinkpad_acpi: Add battery quirk for ThinkPad X131e 2025-03-13 12:53:13 +01:00
pnp
power power: supply: da9150-fg: fix potential overflow 2025-03-07 16:56:37 +01:00
powercap powercap: dtpm_devfreq: Fix error check against dev_pm_qos_add_request() 2024-11-01 01:56:05 +01:00
pps pps: Fix a use-after-free 2025-02-21 13:49:55 +01:00
ps3
ptp pps: Fix a use-after-free 2025-02-21 13:49:55 +01:00
pwm pwm: stm32: Add check for clk_enable() 2025-02-21 13:49:05 +01:00
rapidio rapidio: fix an API misues when rio_add_net() fails 2025-03-13 12:53:15 +01:00
ras
regulator regulator: core: Add missing newline character 2025-02-21 13:49:21 +01:00
remoteproc remoteproc: core: Fix ida_free call while not allocated 2025-02-21 13:49:27 +01:00
reset reset: k210: fix OF node leak in probe() error path 2024-10-17 15:20:47 +02:00
rpmsg rpmsg: glink: use only lower 16-bits of param2 for CMD_OPEN name length 2024-12-14 19:53:47 +01:00
rtc rtc: zynqmp: Fix optional clock name property 2025-02-21 13:49:53 +01:00
s390 s390/cio: Do not unregister the subchannel based on DNV 2024-12-14 19:53:14 +01:00
sbus
scsi scsi: core: Clear driver private data when retrying request 2025-03-07 16:56:42 +01:00
sh sh: clk: Fix clk_enable() to return 0 on NULL clk 2024-12-27 13:52:58 +01:00
siox
slimbus
soc soc: mediatek: mtk-devapc: Fix leaking IO map on driver remove 2025-03-07 16:56:32 +01:00
soundwire soundwire: stream: Revert "soundwire: stream: fix programming slave ports for non-continous port maps" 2024-09-18 19:23:06 +02:00
spi spi: atmel-quadspi: Fix wrong register value written to MR 2025-03-07 16:56:41 +01:00
spmi
ssb
staging staging: media: max96712: fix kernel oops when removing module 2025-02-21 13:49:28 +01:00
target scsi: target: core: Fix null-ptr-deref in target_alloc_device() 2024-11-01 01:56:00 +01:00
tc
tee tee: optee: Fix supplicant wait loop 2025-03-07 16:56:38 +01:00
thermal thermal: of: fix OF node leak in of_thermal_zone_find() 2025-01-17 13:34:42 +01:00
thunderbolt thunderbolt: Don't display nvm_version unless upgrade supported 2025-01-09 13:29:56 +01:00
tty serial: 8250_pci: add support for ASIX AX99100 2025-02-21 13:50:11 +01:00
ufs scsi: ufs: bsg: Set bsg_queue to NULL after removal 2025-02-21 13:49:59 +01:00
uio Drivers: hv: vmbus: Fix rescind handling in uio_hv_generic 2024-09-12 11:10:26 +02:00
usb USB: gadget: f_midi: f_midi_complete to call queue_work 2025-03-07 16:56:33 +01:00
vdpa vdpa/mlx5: Fix suboptimal range on iotlb iteration 2024-12-14 19:53:48 +01:00
vfio vfio/pci: Enable iowrite64 and ioread64 for vfio pci 2025-02-21 13:49:59 +01:00
vhost vhost/scsi: null-ptr-dereference in vhost_scsi_get_req() 2024-10-17 15:22:09 +02:00
video fbdev: omap: use threaded IRQ for LCD DMA 2025-02-21 13:49:58 +01:00
virt
virtio vdpa: Add eventfd for the vdpa callback 2024-10-17 15:21:12 +02:00
vlynq
w1
watchdog watchdog: it87_wdt: add PWRGD enable quirk for Qotom QCML04 2025-01-02 10:30:51 +01:00
xen xen/swiotlb: relax alignment requirements 2025-02-21 13:49:58 +01:00
zorro
Kconfig
Makefile