kernel_samsung_a53x/drivers
Bryan O'Donoghue fe89d6f02d clk: Fix clk_core_get NULL dereference
[ Upstream commit e97fe4901e0f59a0bfd524578fe3768f8ca42428 ]

It is possible for clk_core_get to dereference a NULL in the following
sequence:

clk_core_get()
    of_clk_get_hw_from_clkspec()
        __of_clk_get_hw_from_provider()
            __clk_get_hw()

__clk_get_hw() can return NULL which is dereferenced by clk_core_get() at
hw->core.

Prior to commit dde4eff47c82 ("clk: Look for parents with clkdev based
clk_lookups") the check IS_ERR_OR_NULL() was performed which would have
caught the NULL.

Reading the description of this function it talks about returning NULL but
that cannot be so at the moment.

Update the function to check for hw before dereferencing it and return NULL
if hw is NULL.

Fixes: dde4eff47c82 ("clk: Look for parents with clkdev based clk_lookups")
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Link: https://lore.kernel.org/r/20240302-linux-next-24-03-01-simple-clock-fixes-v1-1-25f348a5982b@linaro.org
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 08:44:56 +01:00
..
accessibility Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
acpi ACPI: scan: Fix device check notification handling 2024-11-19 08:44:47 +01:00
amba Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
android binder: signal epoll threads of self-work 2024-11-18 12:13:30 +01:00
ata ahci: add 43-bit DMA address quirk for ASMedia ASM1061 controllers 2024-11-18 22:25:33 +01:00
atm atm: idt77252: fix a memleak in open_card_ubr0 2024-11-18 12:13:24 +01:00
auxdisplay Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
base regmap: Add bulk read/write callbacks into regmap_config 2024-11-18 23:19:53 +01:00
battery drivers: battery_v2: sec_battery: export {CURRENT/VOLTAGE}_MAX to sysfs 2024-11-17 17:43:14 +01:00
bcma Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
block aoe: fix the potential use-after-free problem in aoecmd_cfg_pkts 2024-11-19 08:44:37 +01:00
bluetooth Bluetooth: qca: Set both WIDEBAND_SPEECH and LE_STATES quirks for QCA2066 2024-11-18 12:13:17 +01:00
bts Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bus bus: tegra-aconnect: Update dependency to ARCH_TEGRA 2024-11-19 08:44:45 +01:00
cdrom Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
char hwrng: core - Fix page fault dead lock on mmap-ed hwrng 2024-11-18 12:12:55 +01:00
clk clk: Fix clk_core_get NULL dereference 2024-11-19 08:44:56 +01:00
clocksource clocksource/drivers/timer-atmel-tcb: Fix initialization on SAM9 hardware 2024-11-18 11:43:12 +01:00
connector Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
counter counter: microchip-tcb-capture: Fix the use of internal GCLK logic 2024-11-08 11:25:51 +01:00
cpufreq cpufreq: brcmstb-avs-cpufreq: add check for cpufreq_cpu_get's return value 2024-11-19 08:44:38 +01:00
cpuidle Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
crypto crypto: xilinx - call finalize with bh disabled 2024-11-19 08:44:52 +01:00
dax Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dca Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
devfreq PM / devfreq: Synchronize devfreq_monitor_[start/stop] 2024-11-18 12:13:09 +01:00
dio Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dma dmaengine: tegra210-adma: Update dependency to ARCH_TEGRA 2024-11-19 08:44:51 +01:00
dma-buf Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
edac EDAC/thunderx: Fix possible out-of-bounds string access 2024-11-18 12:12:19 +01:00
eisa Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
extcon Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fingerprint Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
firewire firewire: core: use long bus reset on gap count error 2024-11-19 08:44:36 +01:00
firmware efi/capsule-loader: fix incorrect allocation size 2024-11-18 23:18:29 +01:00
fpga Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fsi Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gnss Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gpio gpio: fix resource unwinding order in error path 2024-11-18 23:18:30 +01:00
gpu drm/msm/dpu: add division of drm_display_mode's hskew parameter 2024-11-19 08:44:55 +01:00
greybus Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gud Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid HID: lenovo: Add middleclick_workaround sysfs knob for cptkbd 2024-11-19 08:44:51 +01:00
hsi Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hv Drivers: hv: vmbus: Drop error message when 'No request id available' 2024-11-18 23:19:53 +01:00
hwmon hwmon: (coretemp) Enlarge per package core count limit 2024-11-18 22:25:34 +01:00
hwspinlock Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hwtracing coresight: etm4x: Fix width of CCITMIN field 2024-11-18 12:12:19 +01:00
i2c i2c: i801: Fix block process call transactions 2024-11-18 12:13:29 +01:00
i3c i3c: master: cdns: Update maximum prescaler value for i2c clock 2024-11-18 12:13:19 +01:00
ide Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
idle Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ifconn Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
iio iio: accel: bma400: Fix a compilation problem 2024-11-18 12:13:31 +01:00
infiniband RDMA/mlx5: Relax DEVX access upon modify commands 2024-11-19 08:44:35 +01:00
input Input: gpio_keys_polled - suppress deferred probe error for gpio 2024-11-19 08:44:36 +01:00
interconnect interconnect: Treat xlate() returning NULL node as an error 2024-11-18 12:12:00 +01:00
iommu iommu/vt-d: Don't issue ATS Invalidation request when device is disconnected 2024-11-19 08:44:48 +01:00
ipack Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irqchip irqchip/mips-gic: Don't touch vl_map if a local interrupt is not routable 2024-11-18 22:25:34 +01:00
isdn Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kperfmon Kperfmon: add xyunbound version 2024-06-15 16:28:49 -03:00
kq/mesh Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds leds: sgm3140: Add missing timer cleanup and flash gpio control 2024-11-19 08:44:56 +01:00
lightnvm Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
macintosh Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mailbox Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mcb mcb: fix error handling for different scenarios when parsing 2024-11-18 11:43:25 +01:00
md dm: call the resume method on internal suspend 2024-11-19 08:44:50 +01:00
media media: mediatek: vcodec: avoid -Wcast-function-type-strict warning 2024-11-19 08:44:55 +01:00
memory Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
memstick Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
message Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mfd mfd: altera-sysmgr: Call of_node_put() only when of_parse_phandle() takes a ref 2024-11-19 08:44:54 +01:00
misc misc: fastrpc: Mark all sessions as invalid in cb_remove 2024-11-18 12:13:30 +01:00
mmc mmc: wmt-sdmmc: remove an incorrect release_mem_region() call in the .remove function 2024-11-19 08:44:48 +01:00
most Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mtd mtd: rawnand: lpc32xx_mlc: fix irq handler prototype 2024-11-19 08:44:54 +01:00
muic Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mux Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
net nfp: flower: handle acti_netdevs allocation failure 2024-11-19 08:44:50 +01:00
nfc drivers/nfc_logger: Fix implicit int 2024-06-15 16:28:48 -03:00
ntb Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nubus Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nvdimm nd_btt: Make BTT lanes preemptible 2024-11-18 11:43:03 +01:00
nvme nvmet-fc: abort command when there is no binding 2024-11-18 22:25:33 +01:00
nvmem nvmem: imx: correct nregs for i.MX6UL 2024-11-18 10:58:31 +01:00
of of: property: fix typo in io-channels 2024-11-18 12:13:33 +01:00
opp OPP: debugfs: Fix warning around icc_get_name() 2024-11-19 08:44:49 +01:00
oprofile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
parisc Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
parport parport: parport_serial: Add Brainboxes device IDs and geometry 2024-11-18 12:12:19 +01:00
pci PCI: Mark 3ware-9650SE Root Port Extended Tags as broken 2024-11-19 08:44:54 +01:00
pcmcia pcmcia: ds: fix possible name leak in error path in pcmcia_device_add() 2024-11-18 11:43:06 +01:00
perf perf/arm-cmn: Fix the unhandled overflow status of counter 4 to 7 2024-11-08 11:24:52 +01:00
phy phy: ti: phy-omap-usb2: Fix NULL pointer dereference for SRP 2024-11-18 12:13:24 +01:00
pinctrl pinctrl: mediatek: Drop bogus slew rate register range for MT8192 2024-11-19 08:44:52 +01:00
platform platform/x86: touchscreen_dmi: Allow partial (prefix) matches for ACPI names 2024-11-18 23:18:27 +01:00
pnp PNP: ACPI: fix fortify warning 2024-11-18 12:13:09 +01:00
power power: supply: bq27xxx-i2c: Do not free non existing IRQ 2024-11-18 23:18:29 +01:00
powercap Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pps Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ps3 Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ptp ptp: annotate data-race around q->head and q->tail 2024-11-18 11:43:19 +01:00
pwm pwm: jz4740: Don't use dev_err_probe() in .request() 2024-11-18 12:12:47 +01:00
rapidio Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ras Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
regulator regulator: pwm-regulator: Add validity checks in continuous .get_voltage 2024-11-18 22:25:33 +01:00
remoteproc Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
reset reset: hisilicon: hi6220: fix Wvoid-pointer-to-enum-cast warning 2024-11-18 12:12:16 +01:00
rpmsg rpmsg: virtio: Free driver_override when rpmsg_remove() 2024-11-18 12:12:56 +01:00
rtc rtc: Adjust failure return code for cmos_set_alarm() 2024-11-18 12:12:58 +01:00
s390 s390/cio: fix invalid -EBUSY on ccw_device_start 2024-11-18 22:25:37 +01:00
samsung Fix clang 16 errors treewide 2024-06-15 16:28:48 -03:00
sbus Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi scsi: mpt3sas: Prevent sending diag_reset when the controller is ready 2024-11-19 08:44:36 +01:00
sensorhub treewide: fix build errors 2024-06-15 16:21:17 -03:00
sensors Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sfi Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sh Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
siox Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
slimbus Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
soc pmdomain: qcom: rpmhpd: Fix enabled_corner aggregation 2024-11-18 23:18:30 +01:00
soundwire soundwire: stream: fix NULL pointer dereference for multi_link 2024-11-18 12:11:57 +01:00
spi spi: sh-msiof: avoid integer overflow in constants 2024-11-18 22:25:33 +01:00
spmi Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spu_verify Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ssb Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
staging media: imx: csc/scaler: fix v4l2_ctrl_handler memory leak 2024-11-19 08:44:54 +01:00
sti Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
target scsi: target: core: Add TMF to tmr_list handling 2024-11-18 22:25:32 +01:00
tc Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tee tee: optee: Fix supplicant based device enumeration 2024-11-18 12:11:39 +01:00
thermal thermal: core: prevent potential string overflow 2024-11-18 11:42:50 +01:00
thunderbolt thunderbolt: Workaround an IOMMU fault on certain systems with Intel Maple Ridge 2024-11-08 11:26:11 +01:00
tty serial: max310x: fix IO data corruption in batched operations 2024-11-18 23:19:53 +01:00
uh Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
uio uio: Fix use-after-free in uio_open 2024-11-18 12:12:19 +01:00
usb xhci: handle isoc Babble and Buffer Overrun events properly 2024-11-18 23:19:51 +01:00
vdpa Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vfio Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vhost vhost: use kzalloc() instead of kmalloc() followed by memset() 2024-11-18 12:13:27 +01:00
vibrator Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
video backlight: lp8788: Fully initialize backlight_properties during probe 2024-11-19 08:44:56 +01:00
virt Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
virtio virtio-mmio: fix memory leak of vm_dev 2024-11-18 10:58:28 +01:00
vision Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vision3 Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
visorbus Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vlynq Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vme Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
w1 Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
watchdog watchdog: it87_wdt: Keep WDTCTRL bit 3 unmodified for IT8784/IT8786 2024-11-18 12:13:19 +01:00
xen xen/gntdev: Fix the abuse of underlying struct page in DMA-buf import 2024-11-18 12:13:19 +01:00
zorro Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig drivers: add stub kperfmon 2024-06-15 16:28:49 -03:00
Kconfig.variant1 Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile drivers: add stub kperfmon 2024-06-15 16:28:49 -03:00
Makefile.variant1 Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00