linux_dsm_epyc7002/drivers
Brian Norris c9b392357e clk: fix leak on devm_clk_bulk_get_all() unwind
commit f828b0bcacef189edbd247e9f48864fc36bfbe33 upstream.

clk_bulk_get_all() allocates an array of struct clk_bulk data for us
(unlike clk_bulk_get()), so we need to free it. Let's use the
clk_bulk_put_all() helper.

kmemleak complains, on an RK3399 Gru/Kevin system:

unreferenced object 0xffffff80045def00 (size 128):
  comm "swapper/0", pid 1, jiffies 4294667682 (age 86.394s)
  hex dump (first 32 bytes):
    44 32 60 fe fe ff ff ff 00 00 00 00 00 00 00 00  D2`.............
    48 32 60 fe fe ff ff ff 00 00 00 00 00 00 00 00  H2`.............
  backtrace:
    [<00000000742860d6>] __kmalloc+0x22c/0x39c
    [<00000000b0493f2c>] clk_bulk_get_all+0x64/0x188
    [<00000000325f5900>] devm_clk_bulk_get_all+0x58/0xa8
    [<00000000175b9bc5>] dwc3_probe+0x8ac/0xb5c
    [<000000009169e2f9>] platform_drv_probe+0x9c/0xbc
    [<000000005c51e2ee>] really_probe+0x13c/0x378
    [<00000000c47b1f24>] driver_probe_device+0x84/0xc0
    [<00000000f870fcfb>] __device_attach_driver+0x94/0xb0
    [<000000004d1b92ae>] bus_for_each_drv+0x8c/0xd8
    [<00000000481d60c3>] __device_attach+0xc4/0x150
    [<00000000a163bd36>] device_initial_probe+0x1c/0x28
    [<00000000accb6bad>] bus_probe_device+0x3c/0x9c
    [<000000001a199f89>] device_add+0x218/0x3cc
    [<000000001bd84952>] of_device_add+0x40/0x50
    [<000000009c658c29>] of_platform_device_create_pdata+0xac/0x100
    [<0000000021c69ba4>] of_platform_bus_create+0x190/0x224

Fixes: f08c2e2865 ("clk: add managed version of clk_bulk_get_all")
Cc: Dong Aisheng <aisheng.dong@nxp.com>
Cc: stable@vger.kernel.org
Signed-off-by: Brian Norris <briannorris@chromium.org>
Link: https://lore.kernel.org/r/20210731025950.2238582-1-briannorris@chromium.org
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-07-05 18:52:27 +02:00
..
accessibility
acpi Revert "ACPICA: Fix memory leak caused by _CID repair function" 2024-07-05 18:50:58 +02:00
amba
android init: add dsm gpl source 2024-07-05 18:00:04 +02:00
ata init: add dsm gpl source 2024-07-05 18:00:04 +02:00
atm atm: nicstar: register the interrupt handler in the right place 2021-07-19 09:44:52 +02:00
auxdisplay
base firmware_loader: fix use-after-free in firmware_fallback_sysfs 2024-07-05 18:52:10 +02:00
bcma
block rbd: always kick acquire on "acquired" and "released" notifications 2021-07-28 14:35:46 +02:00
bluetooth init: add dsm gpl source 2024-07-05 18:00:04 +02:00
bus bus: ti-sysc: Fix gpt12 system timer issue with reserved status 2024-07-05 18:51:12 +02:00
cdrom cdrom: gdrom: initialize global variable at init time 2021-05-26 12:06:55 +02:00
char init: add dsm gpl source 2024-07-05 18:00:04 +02:00
clk clk: fix leak on devm_clk_bulk_get_all() unwind 2024-07-05 18:52:27 +02:00
clocksource clocksource/arm_arch_timer: Improve Allwinner A64 timer workaround 2021-07-19 09:44:59 +02:00
connector
counter
cpufreq init: add dsm gpl source 2024-07-05 18:00:04 +02:00
cpuidle cpuidle: Fix ARM_QCOM_SPM_CPUIDLE configuration 2021-05-14 09:50:16 +02:00
crypto crypto: qce - fix error return code in qce_skcipher_async_req_handle() 2021-07-14 16:56:54 +02:00
dax
dca
devfreq PM / devfreq: Add missing error code in devfreq_add_device() 2021-07-14 16:56:11 +02:00
dio
dma dmaengine: imx-dma: configure the generic DMA type to make it work 2024-07-05 18:51:28 +02:00
dma-buf init: add dsm gpl source 2024-07-05 18:00:04 +02:00
edac EDAC/Intel: Do not load EDAC driver when running as a guest 2021-07-14 16:56:00 +02:00
eisa
extcon extcon: intel-mrfld: Sync hardware and software state on init 2021-07-19 09:45:00 +02:00
firewire firewire: nosy: Fix a use-after-free bug in nosy_ioctl() 2021-04-07 15:00:11 +02:00
firmware firmware: arm_scmi: Add delayed response status check 2024-07-05 18:07:51 +02:00
fpga fpga: stratix10-soc: Add missing fpga_mgr_free() call 2021-07-19 09:44:59 +02:00
fsi fsi: Add missing MODULE_DEVICE_TABLE 2021-07-20 16:05:42 +02:00
gnss
gpio gpio: tqmx86: really make IRQ optional 2024-07-05 18:52:08 +02:00
gpu drm/amdgpu/display: fix DMUB firmware version info 2024-07-05 18:52:10 +02:00
greybus
hid HID: wacom: Re-enable touch by default for Cintiq 24HDT / 27QHDT 2024-07-05 18:03:16 +02:00
hsi HSI: core: fix resource leaks in hsi_add_client_from_dt() 2021-05-14 09:50:28 +02:00
hv drivers: hv: Fix missing error code in vmbus_connect() 2021-07-14 16:55:59 +02:00
hwmon init: add dsm gpl source 2024-07-05 18:00:04 +02:00
hwspinlock
hwtracing intel_th: Wait until port is in reset before programming it 2021-07-20 16:05:46 +02:00
i2c init: add dsm gpl source 2024-07-05 18:00:04 +02:00
i3c Revert "i3c master: fix missing destroy_workqueue() on error in i3c_master_register" 2021-05-14 09:50:05 +02:00
ide
idle
iio init: add dsm gpl source 2024-07-05 18:00:04 +02:00
infiniband RDMA/mlx5: Delay emptying a cache entry when a new MR is added to it recently 2024-07-05 18:52:08 +02:00
input Input: hideep - fix the uninitialized use in hideep_nvm_unlock() 2021-07-20 16:05:44 +02:00
interconnect interconnect: qcom: Add missing MODULE_DEVICE_TABLE 2021-06-03 09:00:46 +02:00
iommu init: add dsm gpl source 2024-07-05 18:00:04 +02:00
ipack ipack/carriers/tpci200: Fix a double free in tpci200_pci_probe 2021-07-19 09:45:01 +02:00
irqchip init: add dsm gpl source 2024-07-05 18:00:04 +02:00
isdn mISDN: fix possible use-after-free in HFC_cleanup() 2021-07-19 09:44:38 +02:00
leds init: add dsm gpl source 2024-07-05 18:00:04 +02:00
lightnvm
macintosh
mailbox mailbox: qcom-ipcc: Fix IPCC mbox channel exhaustion 2021-07-14 16:56:53 +02:00
mcb
md init: add dsm gpl source 2024-07-05 18:00:04 +02:00
media media: videobuf2-core: dequeue if start_streaming fails 2024-07-05 18:51:28 +02:00
memory memory: tegra: Fix compilation warnings on 64bit platforms 2021-07-25 14:36:14 +02:00
memstick memstick: rtsx_usb_ms: fix UAF 2021-07-14 16:55:53 +02:00
message
mfd init: add dsm gpl source 2024-07-05 18:00:04 +02:00
misc init: add dsm gpl source 2024-07-05 18:00:04 +02:00
mmc init: add dsm gpl source 2024-07-05 18:00:04 +02:00
most
mtd init: add dsm gpl source 2024-07-05 18:00:04 +02:00
mux
net net: vxge: fix use-after-free in vxge_device_unregister 2024-07-05 18:52:09 +02:00
nfc nfc: nfcsim: fix use after free during module unload 2024-07-05 18:03:16 +02:00
ntb init: add dsm gpl source 2024-07-05 18:00:04 +02:00
nubus
nvdimm libnvdimm/region: Fix nvdimm_has_flush() to handle ND_REGION_ASYNC 2021-04-21 13:00:55 +02:00
nvme nvme: fix nvme_setup_command metadata trace event 2024-07-05 18:07:38 +02:00
nvmem init: add dsm gpl source 2024-07-05 18:00:04 +02:00
of init: add dsm gpl source 2024-07-05 18:00:04 +02:00
opp
oprofile
parisc
parport
pci init: add dsm gpl source 2024-07-05 18:00:04 +02:00
pcmcia
perf perf/arm-cmn: Fix invalid pointer when access dtc object sharing the same IRQ number 2021-07-14 16:56:08 +02:00
phy init: add dsm gpl source 2024-07-05 18:00:04 +02:00
pinctrl init: add dsm gpl source 2024-07-05 18:00:04 +02:00
platform platform/x86: toshiba_acpi: Fix missing error code in toshiba_acpi_setup_keyboard() 2021-07-14 16:56:00 +02:00
pnp
power init: add dsm gpl source 2024-07-05 18:00:04 +02:00
powercap
pps
ps3
ptp ptp: improve max_adj check against unreasonable values 2021-06-23 14:42:45 +02:00
pwm init: add dsm gpl source 2024-07-05 18:00:04 +02:00
rapidio rapidio: handle create_workqueue() failure 2021-05-26 12:06:52 +02:00
ras RAS/CEC: Correct ce_add_elem()'s returned values 2021-04-14 08:42:12 +02:00
regulator regulator: rtmv20: Fix wrong mask for strobe-polarity-high 2024-07-05 18:07:37 +02:00
remoteproc remoteproc: k3-r5: Fix an error message 2021-07-20 16:05:50 +02:00
reset init: add dsm gpl source 2024-07-05 18:00:04 +02:00
rpmsg rpmsg: qcom_glink_native: fix error return code of qcom_glink_rx_data() 2021-05-19 10:13:02 +02:00
rtc init: add dsm gpl source 2024-07-05 18:00:04 +02:00
s390 s390/sclp_vt220: fix console name to match device 2021-07-20 16:05:42 +02:00
sbus
scsi scsi: sr: Return correct event when media event code is 3 2024-07-05 18:51:28 +02:00
sfi
sh
siox
slimbus
soc init: add dsm gpl source 2024-07-05 18:00:04 +02:00
soundwire soundwire: stream: Fix test for DP prepare complete 2021-07-14 16:56:47 +02:00
spi spi: imx: mx51-ecspi: Fix low-speed CONFIGREG delay calculation 2024-07-05 18:51:28 +02:00
spmi
ssb ssb: Fix error return code in ssb_bus_scan() 2021-07-14 16:56:21 +02:00
staging init: add dsm gpl source 2024-07-05 18:00:04 +02:00
syno init: add dsm gpl source 2024-07-05 18:00:04 +02:00
target scsi: target: Fix protect handling in WRITE SAME(32) 2021-07-28 14:35:39 +02:00
tc
tee init: add dsm gpl source 2024-07-05 18:00:04 +02:00
thermal init: add dsm gpl source 2024-07-05 18:00:04 +02:00
thunderbolt thunderbolt: Bond lanes only when dual_link_port != NULL in alloc_dev_default() 2021-07-14 16:56:44 +02:00
tty init: add dsm gpl source 2024-07-05 18:00:04 +02:00
uio uio_hv_generic: Fix a memory leak in error handling paths 2021-05-26 12:06:52 +02:00
usb usb: otg-fsm: Fix hrtimer list corruption 2024-07-05 18:52:27 +02:00
vdpa vdpa/mlx5: Clear vq ready indication upon device reset 2021-07-20 16:05:53 +02:00
vfio vfio/pci: Handle concurrent vma faults 2021-07-14 16:56:50 +02:00
vhost init: add dsm gpl source 2024-07-05 18:00:04 +02:00
video backlight: lm3630a: Fix return code of .update_status() callback 2021-07-20 16:05:45 +02:00
virt nitro_enclaves: Fix stale file descriptors on failed usercopy 2021-05-11 14:47:11 +02:00
virtio init: add dsm gpl source 2024-07-05 18:00:04 +02:00
visorbus visorbus: fix error return code in visorchipset_init() 2021-07-14 16:56:41 +02:00
vlynq
vme
w1 w1: ds2438: fixing bug that would always get page0 2021-07-20 16:05:39 +02:00
watchdog Revert "watchdog: iTCO_wdt: Account for rebooting on second timeout" 2024-07-05 18:07:51 +02:00
xen xen/events: reset active flag for lateeoi events later 2021-07-11 12:53:31 +02:00
zorro
Kconfig init: add dsm gpl source 2024-07-05 18:00:04 +02:00
Makefile init: add dsm gpl source 2024-07-05 18:00:04 +02:00