linux/drivers
Shuhao Fu a0f5ffc01a cpufreq: s5pv210: fix refcount leak
[ Upstream commit 2de5cb9606 ]

In function `s5pv210_cpu_init`, a possible refcount inconsistency has
been identified, causing a resource leak.

Why it is a bug:
1. For every clk_get, there should be a matching clk_put on every
successive error handling path.
2. After calling `clk_get(dmc1_clk)`, variable `dmc1_clk` will not be
freed even if any error happens.

How it is fixed: For every failed path, an extra goto label is added to
ensure `dmc1_clk` will be freed regardlessly.

Signed-off-by: Shuhao Fu <sfual@cse.ust.hk>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2026-01-19 13:09:42 +01:00
..
accessibility speakup: Fix sizeof() vs ARRAY_SIZE() bug 2024-06-16 13:39:11 +02:00
acpi ACPI: property: Use ACPI functions in acpi_graph_get_next_endpoint() only 2026-01-19 13:09:41 +01:00
amba amba: bus: fix refcount leak 2023-09-19 12:22:47 +02:00
android binder: remove "invalid inc weak" check 2025-10-29 14:03:12 +01:00
ata ata: libata-scsi: Fix system suspend for a security locked drive 2025-12-07 06:09:33 +09:00
atm atm/fore200e: Fix possible data race in fore200e_open() 2025-12-07 06:09:34 +09:00
auxdisplay auxdisplay: charlcd: Partially revert "Move hwidth and bwidth to struct hd44780_common" 2025-06-04 14:37:57 +02:00
base regmap: slimbus: fix bus_context pointer in regmap init calls 2025-12-07 06:09:14 +09:00
bcma Driver core update for 5.15-rc1 2021-09-01 08:44:42 -07:00
block ps3disk: use memcpy_{from,to}_bvec index 2026-01-19 13:09:29 +01:00
bluetooth Bluetooth: btusb: reorder cleanup in btusb_disconnect to avoid UAF 2025-12-07 06:09:27 +09:00
bus bus: mhi: host: Do not use uninitialized 'dev' pointer in mhi_init_irq_setup() 2025-10-19 16:21:44 +02:00
cdrom scsi: sr: cdrom: Move cdrom_read_cdda_bpc() into the sr driver 2021-07-30 22:13:09 -04:00
char char: misc: Does not request module for miscdevice with dynamic minor 2025-12-07 06:09:19 +09:00
clk clk: renesas: r9a06g032: Fix memory leak in error path 2026-01-19 13:09:29 +01:00
clocksource clocksource/drivers/vf-pit: Replace raw_readl/writel to readl/writel 2025-12-07 06:09:17 +09:00
comedi comedi: check device's attached status in compat ioctls 2026-01-19 13:09:22 +01:00
connector net/connector: Add const qualifier to cb_id 2020-12-16 11:06:49 -08:00
counter counter: microchip-tcb-capture: Fix undefined counter channel state on probe 2025-04-10 14:31:56 +02:00
cpufreq cpufreq: s5pv210: fix refcount leak 2026-01-19 13:09:42 +01:00
cpuidle cpuidle: Fail cpuidle device registration if there is one already 2025-12-07 06:09:17 +09:00
crypto crypto: ccree - Correctly handle return of sg_nents_for_len 2026-01-19 13:09:32 +01:00
cxl cxl/mem: Fix shutdown order 2023-11-20 11:08:27 +01:00
dax dax/kmem: Pass valid argument to memory_group_register_static 2023-07-23 13:47:17 +02:00
dca dca: Use PTR_ERR_OR_ZERO() to simplify code 2020-05-15 16:25:20 +02:00
devfreq PM / devfreq: governor: Replace sscanf() with kstrtoul() in set_freq_store() 2025-08-28 16:24:17 +02:00
dio drivers: dio: fix possible memory leak in dio_init() 2022-12-31 13:14:27 +01:00
dma dmaengine: dw-edma: Set status for callback_result 2025-12-07 06:09:20 +09:00
dma-buf dma-buf: insert memory barrier before updating num_fences 2025-09-09 18:50:23 +02:00
edac EDAC/altera: Use INTTEST register for Ethernet and USB SBE injection 2025-12-07 06:09:30 +09:00
eisa EISA: use DEVICE_ATTR_RO() helper macro 2021-06-04 15:28:34 +02:00
extcon extcon: adc-jack: Cleanup wakeup source only if it was enabled 2025-12-07 06:09:26 +09:00
firewire firewire: nosy: ensure user_length is taken into account when fetching packet contents 2024-05-17 11:51:01 +02:00
firmware efi/cper: align ARM CPER type with UEFI 2.9A/2.10 specs 2026-01-19 13:09:40 +01:00
fpga fpga: zynq_fpga: Fix the wrong usage of dma_map_sgtable() 2025-08-28 16:24:34 +02:00
fsi fsi: aspeed: Reset master errors after CFAM reset 2023-09-19 12:22:46 +02:00
gnss treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
gpio gpio: wcd934x: mark the GPIO controller as sleeping 2025-10-19 16:21:43 +02:00
gpu drm/amd/display: Fix logical vs bitwise bug in get_embedded_panel_info_v2_1() 2026-01-19 13:09:34 +01:00
greybus greybus: Fix use-after-free bug in gb_interface_release due to race condition. 2024-07-05 09:14:23 +02:00
hid HID: elecom: Add support for ELECOM M-XT3URBK (018F) 2026-01-19 13:09:21 +01:00
hsi HSI: ssi_protocol: Fix use after free vulnerability in ssi_protocol Driver Due to Race Condition 2025-05-02 07:44:06 +02:00
hv Drivers: hv: vmbus: Add utility function for querying ring size 2025-07-10 15:57:36 +02:00
hwmon hwmon: (dell-smm) Add support for Dell OptiPlex 7040 2025-12-07 06:09:17 +09:00
hwspinlock hwspinlock: Introduce hwspin_lock_bust() 2024-09-12 11:07:41 +02:00
hwtracing coresight: etm4x: Correct polling IDLE bit 2026-01-19 13:09:40 +01:00
i2c i2c: designware: Add disabling clocks when probe fails 2025-10-19 16:21:32 +02:00
i3c i3c: master: svc: Prevent incomplete IBI transaction 2026-01-19 13:09:25 +01:00
idle intel_idle: Allow loading ACPI tables for any family 2025-08-28 16:24:16 +02:00
iio iio: imu: st_lsm6dsx: Fix measurement unit for odr struct member 2026-01-19 13:09:23 +01:00
infiniband RDMA/irdma: Fix data race in irdma_free_pble 2026-01-19 13:09:33 +01:00
input Input: pegasus-notetaker - fix potential out-of-bounds access 2025-12-07 06:09:33 +09:00
interconnect interconnect: qcom: sc7280: Add missing num_links to xm_pcie3_1 node 2025-08-28 16:24:03 +02:00
iommu iommu/arm-smmu-qcom: Enable use of all SMR groups when running bare-metal 2026-01-19 13:09:33 +01:00
ipack ipack: ipoctal: fix module reference leak 2021-09-27 17:38:49 +02:00
irqchip irqchip/qcom-irq-combiner: Fix section mismatch 2026-01-19 13:09:22 +01:00
isdn isdn: mISDN: hfcsusb: fix memory leak in hfcsusb_probe() 2025-12-07 06:09:30 +09:00
leds leds: netxbig: Fix GPIO descriptor leak in error paths 2026-01-19 13:09:29 +01:00
macintosh macintosh/mac_hid: fix race condition in mac_hid_toggle_emumouse 2026-01-19 13:09:28 +01:00
mailbox mailbox: mailbox-test: Fix debugfs_create_dir error checking 2025-12-07 06:09:34 +09:00
mcb mcb: fix a double free bug in chameleon_parse_gdd() 2025-05-02 07:44:31 +02:00
md dm log-writes: Add missing set_freezable() for freezable kthread 2026-01-19 13:09:39 +01:00
media media: redrat3: use int type to store negative error codes 2025-12-07 06:09:21 +09:00
memory memory: samsung: exynos-srom: Fix of_iomap leak in exynos_srom_probe 2025-10-19 16:21:47 +02:00
memstick memstick: Add timeout to prevent indefinite waiting 2025-12-07 06:09:16 +09:00
message scsi: fusion: Remove unused variable 'rc' 2024-12-14 19:51:02 +01:00
mfd mfd: mt6358-irq: Fix missing irq_domain_remove() in error path 2026-01-19 13:09:31 +01:00
misc mei: me: add wildcat lake P DID 2025-10-29 14:03:12 +01:00
mmc mmc: sdhci-of-dwcmshc: Change DLL_STRBIN_TAPNUM_DEFAULT to 0x4 2025-12-07 06:09:32 +09:00
most most: usb: fix double free on late probe failure 2025-12-07 06:09:35 +09:00
mtd mtd: lpddr_cmds: fix signed shifts in lpddr_cmds 2026-01-19 13:09:36 +01:00
mux mux: gpio: Simplify code by using dev_err_probe() 2021-04-02 16:28:53 +02:00
net net: stmmac: fix rx limit check in stmmac_rx_zc() 2026-01-19 13:09:36 +01:00
nfc minmax: make generic MIN() and MAX() macros available everywhere 2025-10-19 16:21:52 +02:00
ntb ntb: reduce stack usage in idt_scan_mws 2025-05-02 07:44:36 +02:00
nubus nubus: Partially revert proc_create_single_data() conversion 2023-07-05 18:25:05 +01:00
nvdimm libnvdimm/labels: Fix divide error in nd_label_data_init() 2025-06-04 14:37:55 +02:00
nvme nvme: nvme-fc: Ensure ->ioerr_work is cancelled in nvme_fc_delete_ctrl() 2025-12-07 06:09:30 +09:00
nvmem nvmem: core: improve range check for nvmem_cell_write() 2025-03-13 12:50:32 +01:00
of of: module: add buffer overflow check in of_modalias() 2025-05-09 09:39:41 +02:00
opp OPP: debugfs: Fix warning around icc_get_name() 2024-03-26 18:21:23 -04:00
parisc parisc: iosapic.c: Fix sparse warnings 2023-10-06 13:18:15 +02:00
parport parport_pc: add support for ASIX AX99100 2025-03-13 12:50:46 +01:00
pci PCI: dwc: Fix wrong PORT_LOGIC_LTSSM_STATE_MASK definition 2026-01-19 13:09:32 +01:00
pcmcia pcmcia: omap_cf: Mark driver struct with __refdata to prevent section mismatch 2025-10-02 13:39:05 +02:00
perf perf: arm_spe: Prevent overflow in PERF_IDX2OFF() 2025-10-19 16:21:29 +02:00
phy phy: rockchip: phy-rockchip-inno-csidphy: allow writes to grf register 0 2025-12-07 06:09:21 +09:00
pinctrl pinctrl: single: Fix incorrect type for error return variable 2026-01-19 13:09:36 +01:00
platform platform/x86: asus-wmi: use brightness_set_blocking() for kbd led 2026-01-19 13:09:38 +01:00
pnp PNP: ACPI: fix fortify warning 2024-02-23 08:54:38 +01:00
power power: supply: apm_power: only unset own apm_get_power_status 2026-01-19 13:09:25 +01:00
powercap powercap: intel_rapl: Do not change CLAMPING bit if ENABLE bit cannot be changed 2025-08-28 16:24:03 +02:00
pps pps: fix warning in pps_register_cdev when register device fail 2025-10-19 16:21:33 +02:00
ps3 powerpc/ps3: Warn on PS3 device errors 2021-06-10 21:44:58 +10:00
ptp ptp: Limit time setting of PTP clocks 2025-12-07 06:09:20 +09:00
pwm pwm: bcm2835: Make sure the channel is enabled after pwm_request() 2026-01-19 13:09:31 +01:00
rapidio drivers/rapidio/rio_cm.c: prevent possible heap overwrite 2025-06-27 11:05:33 +01:00
ras RAS/CEC: Correct ce_add_elem()'s returned values 2021-04-07 11:52:26 +02:00
regulator regulator: core: Protect regulator_supply_alias_list with regulator_list_mutex 2026-01-19 13:09:35 +01:00
remoteproc remoteproc: qcom_q6v5_wcss: fix parsing of qcom,halt-regs 2026-01-19 13:09:36 +01:00
reset reset: brcmstb: Enable reset drivers for ARCH_BCM2835 2025-08-28 16:24:18 +02:00
rpmsg rpmsg: qcom_smd: Fix uninitialized return variable in __qcom_smd_send() 2025-06-27 11:05:15 +01:00
rtc rtc: rx8025: fix incorrect register reference 2025-12-07 06:09:26 +09:00
s390 s390/ap: Don't leak debug feature files if AP instructions are not available 2026-01-19 13:09:24 +01:00
sbus module: remove never implemented MODULE_SUPPORTED_DEVICE 2021-03-17 13:16:18 -07:00
scsi scsi: sim710: Fix resource leak by adding missing ioport_unmap() calls 2026-01-19 13:09:29 +01:00
sh sh: clk: Fix clk_enable() to return 0 on NULL clk 2025-01-09 13:28:34 +01:00
siox siox: fix possible memory leak in siox_device_add() 2022-11-26 09:24:36 +01:00
slimbus slimbus: ngd: Fix reference count leak in qcom_slim_ngd_notify_slaves 2025-12-07 06:09:35 +09:00
soc pmdomain: samsung: plug potential memleak during probe 2025-12-07 06:09:32 +09:00
soundwire soundwire: stream: restore params when prepare ports fail 2025-08-28 16:24:10 +02:00
spi spi: tegra210-quad: Fix X1_X2_X4 encoding and support x4 transfers 2026-01-19 13:09:41 +01:00
spmi spmi: hisi-spmi-controller: Do not override device identifier 2024-07-05 09:14:20 +02:00
ssb ssb: Fix division by zero issue in ssb_calc_clock_rate 2024-09-04 13:23:20 +02:00
staging staging: fbtft: core: fix potential memory leak in fbtft_probe_common() 2026-01-19 13:09:32 +01:00
target scsi: target: Do not write NUL characters into ASCII configfs output 2026-01-19 13:09:25 +01:00
tc The main MIPS changes for 5.6: 2020-01-31 11:28:31 -08:00
tee tee: allow a driver to allocate a tee_device without a pool 2025-12-07 06:09:17 +09:00
thermal thermal/drivers/qcom/lmh: Add missing IRQ includes 2025-10-19 16:21:31 +02:00
thunderbolt thunderbolt: Add support for Intel Wildcat Lake 2025-12-07 06:09:35 +09:00
tty serial: add support of CPCI cards 2026-01-19 13:09:20 +01:00
uio uio: uio_fsl_elbc_gpcm:: Add null pointer check to uio_fsl_elbc_gpcm_probe 2026-01-19 13:09:23 +01:00
usb usb: phy: Initialize struct usb_phy list_head 2026-01-19 13:09:40 +01:00
vdpa vdpa: Sync calls set/get config/status with cf_mutex 2026-01-19 13:09:34 +01:00
vfio vfio/type1: Fix error unwind in migration dirty bitmap allocation 2025-06-27 11:05:13 +01:00
vhost vdpa: Sync calls set/get config/status with cf_mutex 2026-01-19 13:09:34 +01:00
video fbdev: ssd1307fb: fix potential page leak in ssd1307fb_probe() 2026-01-19 13:09:36 +01:00
virt minmax: add in_range() macro 2025-10-19 16:21:28 +02:00
virtio virtio_vdpa: fix misleading return in void function 2026-01-19 13:09:35 +01:00
visorbus visorbus: fix error return code in visorchipset_init() 2021-06-04 15:27:26 +02:00
vlynq bus: Make remove callback return void 2021-07-21 11:53:42 +02:00
vme vme: Fix error not catched in fake_init() 2022-12-31 13:14:30 +01:00
w1 w1: fix loop in w1_fini() 2023-07-23 13:47:20 +02:00
watchdog watchdog: wdat_wdt: Fix ACPI table leak in probe function 2026-01-19 13:09:30 +01:00
xen xen/events: Update virq_to_irq on migration 2025-10-19 16:21:55 +02:00
zorro zorro: Drop useless (and hardly used) .driver member in struct zorro_dev 2021-08-05 14:37:04 +02:00
Kconfig firmware: include drivers/firmware/Kconfig unconditionally 2021-10-07 16:51:26 +02:00
Makefile virtio: always enter drivers/virtio/ 2021-12-22 09:32:39 +01:00