Yang Yingliang
440afd7fd9
rapidio: fix possible name leaks when rio_add_device() fails
...
[ Upstream commit f9574cd48679926e2a569e1957a5a1bcc8a719ac ]
Patch series "rapidio: fix three possible memory leaks".
This patchset fixes three name leaks in error handling.
- patch #1 fixes two name leaks while rio_add_device() fails.
- patch #2 fixes a name leak while rio_register_mport() fails.
This patch (of 2):
If rio_add_device() returns error, the name allocated by dev_set_name()
need be freed. It should use put_device() to give up the reference in the
error path, so that the name can be freed in kobject_cleanup(), and the
'rdev' can be freed in rio_release_dev().
Link: https://lkml.kernel.org/r/20221114152636.2939035-1-yangyingliang@huawei.com
Link: https://lkml.kernel.org/r/20221114152636.2939035-2-yangyingliang@huawei.com
Fixes: e8de370188 ("rapidio: add mport char device driver")
Fixes: 1fa5ae857b ("driver core: get rid of struct device's bus_id string array")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Cc: Alexandre Bounine <alex.bou9@gmail.com>
Cc: Matt Porter <mporter@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-01-18 11:40:56 +01:00
..
accessibility
acpi
ACPI: video: Force backlight native for more TongFang devices
2022-10-29 10:20:36 +02:00
amba
android
binder: Gracefully handle BINDER_TYPE_FDA objects with num_fds=0
2022-12-08 11:23:01 +01:00
ata
ata: libata-transport: fix double ata_host_put() in ata_tport_add()
2022-11-25 17:42:15 +01:00
atm
atm: idt77252: fix use-after-free bugs caused by tst_timer
2022-08-25 11:18:26 +02:00
auxdisplay
base
PM: domains: Fix handling of unavailable/disabled idle states
2022-11-03 23:56:56 +09:00
bcma
block
drbd: use after free in drbd_create_device()
2022-11-25 17:42:16 +01:00
bluetooth
Bluetooth: hci_intel: Add check for platform_driver_register
2022-08-25 11:17:47 +02:00
bus
bus: sunxi-rsb: Support atomic transfers
2022-12-08 11:22:57 +01:00
cdrom
char
tpm/tpm_crb: Fix error message in __crb_relinquish_locality()
2023-01-18 11:40:53 +01:00
clk
clk: bcm2835: Make peripheral PLLC critical
2022-10-26 13:22:59 +02:00
clocksource
Revert "clocksource/drivers/riscv: Events are stopped during CPU suspend"
2022-12-08 11:23:06 +01:00
connector
counter
cpufreq
cpufreq: amd_freq_sensitivity: Add missing pci_dev_put()
2023-01-18 11:40:55 +01:00
cpuidle
cpuidle: dt: Return the correct numbers of parsed idle states
2023-01-18 11:40:53 +01:00
crypto
crypto: cavium - prevent integer overflow loading firmware
2022-10-26 13:22:46 +02:00
dax
dca
devfreq
PM / devfreq: exynos-ppmu: Fix refcount leak in of_get_devfreq_events
2022-07-07 17:36:49 +02:00
dio
dma
dmaengine: at_hdmac: Check return code of dma_async_device_register
2022-11-25 17:42:10 +01:00
dma-buf
udmabuf: Set the DMA mask for the udmabuf device (v2)
2022-09-05 10:27:45 +02:00
edac
EDAC/i10nm: fix refcount leak in pci_get_dev_wrapper()
2023-01-18 11:40:55 +01:00
eisa
extcon
extcon: Modify extcon device to be created after driver data is set
2022-06-14 18:12:00 +02:00
firewire
firmware
firmware: coreboot: Register bus in module init
2022-12-08 11:23:00 +01:00
fpga
fpga: altera-pr-ip: fix unsigned comparison with less than zero
2022-08-25 11:17:51 +02:00
fsi
fsi: core: Check error number after calling ida_simple_get
2022-10-26 13:22:41 +02:00
gnss
gpio
gpio: amd8111: Fix PCI device reference count leak
2022-12-14 11:30:44 +01:00
gpu
drm/bridge: ti-sn65dsi86: Fix output polarity setting bug
2022-12-14 11:30:44 +01:00
greybus
hid
HID: uclogic: Add HID_QUIRK_HIDINPUT_FORCE quirk
2023-01-18 11:40:48 +01:00
hsi
HSI: omap_ssi_port: Fix dma_map_sg error check
2022-10-26 13:22:36 +02:00
hv
Drivers: hv: vmbus: fix possible memory leak in vmbus_device_register()
2022-12-08 11:22:58 +01:00
hwmon
hwmon: (coretemp) fix pci device refcount leak in nv1a_ram_new()
2022-12-08 11:23:03 +01:00
hwspinlock
hwtracing
intel_th: pci: Add Meteor Lake-P support
2022-08-25 11:18:13 +02:00
i2c
i2c: i801: add lis3lv02d's I2C address for Vostro 5568
2022-11-25 17:42:12 +01:00
i3c
ide
idle
intel_idle: Disable IBRS during long idle
2022-10-07 09:16:55 +02:00
iio
iio: light: rpr0521: add missing Kconfig dependencies
2022-12-08 11:23:02 +01:00
infiniband
RDMA/qedr: clean up work queue on failure in qedr_alloc_resources()
2022-11-10 17:57:50 +01:00
input
Input: synaptics - switch touchpad on HP Laptop 15-da3001TU to RMI mode
2022-12-08 11:23:00 +01:00
interconnect
iommu
iommu/vt-d: Fix PCI device refcount leak in dmar_dev_scope_init()
2022-12-08 11:23:04 +01:00
ipack
irqchip
irqchip: gic-pm: Use pm_runtime_resume_and_get() in gic_probe()
2023-01-18 11:40:54 +01:00
isdn
mISDN: fix misuse of put_device() in mISDN_register_device()
2022-11-25 17:42:15 +01:00
leds
lightnvm
macintosh
macintosh/adb: fix oob read in do_adb_query() function
2022-08-11 12:57:53 +02:00
mailbox
mailbox: bcm-ferxrm-mailbox: Fix error check for dma_map_sg
2022-10-26 13:22:44 +02:00
mcb
md
dm integrity: flush the journal on suspend
2022-12-08 11:23:01 +01:00
media
media: v4l2-dv-timings.c: fix too strict blanking sanity checks
2022-12-14 11:30:43 +01:00
memory
memory: of: Fix refcount leak bug in of_get_ddr_timings()
2022-10-26 13:22:31 +02:00
memstick
memstick/ms_block: Fix a memory leak
2022-08-25 11:17:55 +02:00
message
mfd
mfd: sm501: Add check for platform_driver_register()
2022-10-26 13:22:42 +02:00
misc
misc/vmw_vmci: fix an infoleak in vmci_host_do_receive_datagram()
2022-11-25 17:42:20 +01:00
mmc
mmc: sdhci: Fix voltage switch delay
2022-12-08 11:23:06 +01:00
mtd
spi: intel: Fix the offset to get the 64K erase opcode
2022-11-25 17:42:11 +01:00
mux
net
net: loopback: use NET_NAME_PREDICTABLE for name_assign_type
2023-01-18 11:40:49 +01:00
nfc
nfc: st-nci: fix memory leaks in EVT_TRANSACTION
2022-12-08 11:22:59 +01:00
ntb
NTB: ntb_tool: uninitialized heap data in tool_fn_write()
2022-08-25 11:18:26 +02:00
nubus
nvdimm
nvdimm: Fix badblocks clear off-by-one error
2022-07-07 17:36:48 +02:00
nvme
nvme initialize core quirks before calling nvme_init_subsystem
2022-12-14 11:30:46 +01:00
nvmem
of
of: property: decrement node refcount in of_fwnode_get_reference_args()
2022-12-08 11:23:02 +01:00
opp
opp: Fix error check in dev_pm_opp_attach_genpd()
2022-08-25 11:18:00 +02:00
oprofile
parisc
parisc: Export iosapic_serial_irq() symbol for serial port driver
2022-11-10 17:57:56 +01:00
parport
parport_pc: Avoid FIFO port location truncation
2022-11-25 17:42:14 +01:00
pci
PCI: Sanitise firmware BAR assignments behind a PCI-PCI bridge
2022-10-26 13:22:16 +02:00
pcmcia
perf
perf/smmuv3: Fix hotplug callback leak in arm_smmu_pmu_init()
2023-01-18 11:40:50 +01:00
phy
phy: stm32: fix an error code in probe
2022-11-25 17:42:03 +01:00
pinctrl
pinctrl: meditatek: Startup with the IRQs disabled
2022-12-19 12:24:16 +01:00
platform
platform/x86: hp-wmi: Ignore Smart Experience App event
2022-12-08 11:23:00 +01:00
pnp
PNP: fix name memory leak in pnp_alloc_dev()
2023-01-18 11:40:54 +01:00
power
soc: ti: smartreflex: Fix PM disable depth imbalance in omap_sr_probe
2023-01-18 11:40:50 +01:00
powercap
powercap: intel_rapl: fix UBSAN shift-out-of-bounds issue
2022-10-26 13:22:47 +02:00
pps
ps3
ptp
pwm
rapidio
rapidio: fix possible name leaks when rio_add_device() fails
2023-01-18 11:40:56 +01:00
ras
regulator
regulator: twl6030: fix get status of twl6032 regulators
2022-12-14 11:30:41 +01:00
remoteproc
remoteproc: qcom: wcnss: Fix handling of IRQs
2022-08-25 11:18:02 +02:00
reset
rpmsg
rpmsg: qcom: glink: replace strncpy() with strscpy_pad()
2022-10-15 07:54:38 +02:00
rtc
s390
s390/dasd: fix no record found for raw_track_access
2022-12-08 11:22:59 +01:00
sbus
scsi
scsi: core: Restrict legal sdev_state transitions via sysfs
2022-11-10 17:57:53 +01:00
sfi
sh
siox
siox: fix possible memory leak in siox_device_add()
2022-11-25 17:42:14 +01:00
slimbus
slimbus: stream: correct presence rate frequencies
2022-11-25 17:42:17 +01:00
soc
soc: ti: knav_qmss_queue: Fix PM disable depth imbalance in knav_queue_probe
2023-01-18 11:40:50 +01:00
soundwire
soundwire: bus_type: fix remove and shutdown support
2022-08-25 11:17:54 +02:00
spi
spi: spi-imx: Fix spi_bus_clk if requested clock is higher than input clock
2022-12-08 11:23:02 +01:00
spmi
spmi: pmic-arb: correct duplicate APID to PPID mapping logic
2022-10-26 13:22:43 +02:00
ssb
staging
speakup: fix a segfault caused by switching consoles
2022-11-25 17:42:18 +01:00
target
scsi: target: tcm_loop: Fix possible name leak in tcm_loop_setup_hba_bus()
2022-11-25 17:42:20 +01:00
tc
tee
tee: optee: fix possible memory leak in optee_register_device()
2022-12-08 11:22:57 +01:00
thermal
thermal: intel_powerclamp: Use first online CPU as control_cpu
2022-10-26 13:23:01 +02:00
thunderbolt
thunderbolt: Use the actual buffer in tb_async_error()
2022-09-15 12:04:52 +02:00
tty
serial: 8250: 8250_omap: Avoid RS485 RTS glitch on ->set_termios()
2022-12-08 11:23:00 +01:00
uio
usb
usb: musb: remove extra check in musb_gadget_vbus_draw
2023-01-18 11:40:49 +01:00
vfio
vfio: Clear the caps->buf to NULL after free
2022-08-25 11:18:36 +02:00
vhost
vhost/vsock: Use kvmalloc/kvfree for larger packets.
2022-10-26 13:22:25 +02:00
video
fbcon: Use kzalloc() in fbcon_prepare_logo()
2022-12-14 11:30:41 +01:00
virt
vboxguest: Do not use devm for irq
2022-08-25 11:18:33 +02:00
virtio
virtio_mmio: Restore guest page size on resume
2022-07-21 20:59:24 +02:00
visorbus
vlynq
vme
w1
watchdog
watchdog: armada_37xx_wdt: check the return value of devm_ioremap() in armada_37xx_wdt_probe()
2022-08-25 11:18:06 +02:00
xen
xen/platform-pci: add missing free_irq() in error path
2022-12-08 11:23:00 +01:00
zorro
Kconfig
Makefile