android_kernel_sony_sdm845/drivers
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Linus Walleij 5797d00212 clk: kirkwood: Fix a clocking boot regression
commit aaedb9e00e5400220a8871180d23a83e67f29f63 upstream.

Since a few kernel releases the Pogoplug 4 has crashed like this
during boot:

Unable to handle kernel NULL pointer dereference at virtual address 00000002
(...)
[<c04116ec>] (strlen) from [<c00ead80>] (kstrdup+0x1c/0x4c)
[<c00ead80>] (kstrdup) from [<c04591d8>] (__clk_register+0x44/0x37c)
[<c04591d8>] (__clk_register) from [<c04595ec>] (clk_hw_register+0x20/0x44)
[<c04595ec>] (clk_hw_register) from [<c045bfa8>] (__clk_hw_register_mux+0x198/0x1e4)
[<c045bfa8>] (__clk_hw_register_mux) from [<c045c050>] (clk_register_mux_table+0x5c/0x6c)
[<c045c050>] (clk_register_mux_table) from [<c0acf3e0>] (kirkwood_clk_muxing_setup.constprop.0+0x13c/0x1ac)
[<c0acf3e0>] (kirkwood_clk_muxing_setup.constprop.0) from [<c0aceae0>] (of_clk_init+0x12c/0x214)
[<c0aceae0>] (of_clk_init) from [<c0ab576c>] (time_init+0x20/0x2c)
[<c0ab576c>] (time_init) from [<c0ab3d18>] (start_kernel+0x3dc/0x56c)
[<c0ab3d18>] (start_kernel) from [<00000000>] (0x0)
Code: e3130020 1afffffb e12fff1e c08a1078 (e5d03000)

This is because the "powersave" mux clock 0 was provided in an unterminated
array, which is required by the loop in the driver:

        /* Count, allocate, and register clock muxes */
        for (n = 0; desc[n].name;)
                n++;

Here n will go out of bounds and then call clk_register_mux() on random
memory contents after the mux clock.

Fix this by terminating the array with a blank entry.

Fixes: 105299381d ("cpufreq: kirkwood: use the powersave multiplexer")
Cc: stable@vger.kernel.org
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Chris Packham <chris.packham@alliedtelesis.co.nz>
Cc: Gregory CLEMENT <gregory.clement@bootlin.com>
Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20210814235514.403426-1-linus.walleij@linaro.org
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-22 11:43:02 +02:00
..
accessibility
acpi ACPI: NFIT: Fix support for virtual SPA ranges 2021-08-26 08:37:22 -04:00
amba amba: Fix resource leak for drivers without .remove 2021-03-03 17:44:38 +01:00
android binder: Prevent context manager from incrementing ref 0 2020-08-21 11:01:55 +02:00
ata libata: fix ata_host_start() 2021-09-22 11:42:58 +02:00
atm atm: nicstar: register the interrupt handler in the right place 2021-07-20 16:21:08 +02:00
auxdisplay
base regmap: fix the offset of register error log 2021-09-22 11:42:58 +02:00
bcma bcma: Fix memory leak for internally-handled cores 2021-09-22 11:43:02 +02:00
block cryptoloop: add a deprecation warning 2021-09-22 11:42:55 +02:00
bluetooth Bluetooth: btusb: fix bt fiwmare downloading failure issue for qca btsoc. 2021-07-20 16:21:08 +02:00
bus bus: qcom: Put child node before return 2021-05-22 10:40:23 +02:00
cdrom cdrom: gdrom: initialize global variable at init time 2021-05-26 11:29:07 +02:00
char virtio_console: Assure used length from device is limited 2021-07-20 16:21:14 +02:00
clk clk: kirkwood: Fix a clocking boot regression 2021-09-22 11:43:02 +02:00
clocksource clocksource/drivers/mxs_timer: Add missing semicolon when DEBUG is defined 2021-03-03 17:44:37 +01:00
connector
cpufreq cpufreq: powernow-k8: pass policy rather than use cpufreq_cpu_get() 2021-01-17 13:57:54 +01:00
cpuidle cpuidle: Fix three reference count leaks 2020-06-20 10:24:18 +02:00
crypto crypto: qat - use proper type for vf_mask 2021-09-22 11:42:59 +02:00
dax
dca
devfreq PM / devfreq: tegra30: Fix integer overflow on CPU's freq max out 2020-10-01 20:40:02 +02:00
dio
dma dmaengine: of-dma: router_xlate to return -EPROBE_DEFER if controller is not yet available 2021-08-26 08:37:26 -04:00
dma-buf
edac EDAC/i5100: Fix error handling order in i5100_init_one() 2020-10-29 09:05:32 +01:00
eisa
extcon extcon: max8997: Add missing modalias string 2021-07-20 16:21:05 +02:00
firewire firewire: nosy: Fix a use-after-free bug in nosy_ioctl() 2021-04-07 12:05:40 +02:00
firmware qemu_fw_cfg: Make fw_cfg_rev_attr a proper kobj_attribute 2021-07-20 16:21:09 +02:00
fmc
fpga
gpio gpio: zynq: Check return value of pm_runtime_get_sync 2021-07-20 16:21:12 +02:00
gpu drm/msm/dsi: Fix some reference counted resource leaks 2021-09-22 11:43:00 +02:00
hid HID: gt683r: add missing MODULE_DEVICE_TABLE 2021-06-30 08:49:11 -04:00
hsi HSI: core: fix resource leaks in hsi_add_client_from_dt() 2021-05-22 10:40:26 +02:00
hv Drivers: hv: vmbus: Increase wait time for VMbus unload 2021-05-22 10:40:24 +02:00
hwmon hwmon: (max31790) Fix fan speed reporting for fan7..12 2021-07-20 16:21:01 +02:00
hwspinlock
hwtracing intel_th: Consistency and off-by-one fix 2021-05-22 10:40:16 +02:00
i2c i2c: mt65xx: fix IRQ check 2021-09-22 11:43:02 +02:00
ide block: Move SECTOR_SIZE and SECTOR_SHIFT definitions into <linux/blkdev.h> 2020-09-12 11:47:36 +02:00
idle
iio iio: adc: Fix incorrect exit of for-loop 2021-08-26 08:37:22 -04:00
infiniband IB/hfi1: Fix possible null-pointer dereference in _extend_sdma_tx_descs() 2021-09-03 09:44:40 +02:00
input Input: hil_kbd - fix error return code in hil_dev_connect() 2021-07-20 16:21:04 +02:00
iommu iommu/amd: Fix backport of 140456f994195b568ecd7fc2287a34eadffef3ca 2021-08-04 11:58:01 +02:00
ipack ipack: tpci200: fix many double free issues in tpci200_pci_probe 2021-08-26 08:37:28 -04:00
irqchip irqchip/alpine-msi: Fix freeing of interrupts on allocation error path 2020-12-29 13:45:00 +01:00
isdn mISDN: fix possible use-after-free in HFC_cleanup() 2021-07-20 16:21:06 +02:00
leds leds: ktd2692: Fix an error handling path 2021-07-20 16:21:05 +02:00
lguest
lightnvm
macintosh drivers/macintosh: Fix memleak in windfarm_pm112 driver 2020-06-20 10:24:21 +02:00
mailbox
mcb
md dm btree remove: assign new_root only when removal succeeds 2021-07-20 16:21:10 +02:00
media media: go7007: remove redundant initialization 2021-09-22 11:42:59 +02:00
memory memory: fsl_ifc: fix leak of private memory on probe failure 2021-07-20 16:21:15 +02:00
memstick memstick: r592: Fix error return in r592_probe() 2020-12-29 13:44:58 +01:00
message scsi: mptfusion: Fix null pointer dereferences in mptscsih_remove() 2020-11-10 10:23:57 +01:00
mfd mfd: da9052/stmpe: Add and modify MODULE_DEVICE_TABLE 2021-07-20 16:21:11 +02:00
misc misc/libmasm/module: Fix two use after free in ibmasm_init_one 2021-07-20 16:21:11 +02:00
mmc mmc: moxart: Fix issue with uninitialized dma_slave_config 2021-09-22 11:43:01 +02:00
mtd mtd: nand: atmel_nand: remove build warning in atmel_nand_remove() 2021-09-22 11:42:55 +02:00
net ath6kl: wmi: fix an error code in ath6kl_wmi_sync_point() 2021-09-22 11:43:02 +02:00
nfc nfc: nfcsim: fix use after free during module unload 2021-08-04 11:58:03 +02:00
ntb NTB: hw: amd: fix an issue about leak system resources 2020-10-29 09:05:41 +01:00
nubus
nvdimm libnvdimm/dimm: Avoid race between probe and available_slots_show() 2021-03-03 17:44:44 +01:00
nvme nvme-pci: Fix an error handling path in 'nvme_probe()' 2021-09-22 11:42:57 +02:00
nvmem nvmem: qfprom: remove incorrect write support 2020-06-11 09:22:22 +02:00
of of: Fix truncation of memory sizes on 32-bit platforms 2021-07-20 16:21:05 +02:00
oprofile
parisc parisc: mask out enable and reserved bits from sba imask 2020-08-21 11:02:06 +02:00
parport
pci PCI: PM: Enable PME if it can be signaled from D3cold 2021-09-22 11:43:00 +02:00
pcmcia pcmcia: i82092: fix a null pointer dereference bug 2021-08-15 13:01:03 +02:00
perf
phy phy: ti: dm816x: Fix the error handling path in 'dm816x_usb_phy_probe() 2021-07-20 16:21:05 +02:00
pinctrl pinctrl/amd: Add device HID for new AMD GPIO controller 2021-07-20 16:21:09 +02:00
platform platform/x86: toshiba_acpi: Fix missing error code in toshiba_acpi_setup_keyboard() 2021-07-20 16:21:00 +02:00
pnp
power power: supply: max17042_battery: fix typo in MAx17042_TOFF 2021-09-22 11:42:58 +02:00
powercap powercap: restrict energy meter to root access 2020-11-10 21:04:57 +01:00
pps
ps3 powerpc/ps3: use dma_mapping_error() 2020-12-29 13:45:00 +01:00
ptp ptp: free ptp device pin descriptors properly 2020-05-20 08:15:33 +02:00
pwm pwm: tegra: Don't modify HW state in .remove callback 2021-07-20 16:21:14 +02:00
rapidio rapidio: handle create_workqueue() failure 2021-05-26 11:29:06 +02:00
ras
regulator regulator: da9052: Ensure enough delay time for .set_voltage_time_sel 2021-07-20 16:20:59 +02:00
remoteproc remoteproc: qcom_q6v5_mss: Validate MBA firmware size before load 2021-02-23 13:59:14 +01:00
reset reset: ti-syscon: fix to_ti_syscon_reset_data macro 2021-07-28 09:14:24 +02:00
rpmsg
rtc rtc: max77686: Do not enforce (incorrect) interrupt trigger type 2021-07-28 09:14:25 +02:00
s390 s390/sclp_vt220: fix console name to match device 2021-07-20 16:21:11 +02:00
sbus
scsi scsi: core: Avoid printing an error if target_alloc() returns -ENXIO 2021-08-26 08:37:26 -04:00
sfi
sh
sn
soc soc: qcom: smsm: Fix missed interrupts if state changes while masked 2021-09-22 11:43:00 +02:00
spi spi: spi-pic32: Fix issue with uninitialized dma_slave_config 2021-09-22 11:42:59 +02:00
spmi
ssb ssb: sdio: Don't overwrite const buffer if block_write fails 2021-07-20 16:20:57 +02:00
staging staging: gdm724x: check for overflow in gdm_lte_netif_rx() 2021-07-20 16:21:05 +02:00
target scsi: target: Fix protect handling in WRITE SAME(32) 2021-07-28 09:14:27 +02:00
tc
thermal thermal/core: Correct function name thermal_zone_device_unregister() 2021-07-28 09:14:25 +02:00
thunderbolt
tty tty: Fix data race between tiocsti() and flush_to_ldisc() 2021-09-22 11:43:02 +02:00
uio uio_pdrv_genirq: fix use without device tree and no interrupt 2020-07-22 09:10:53 +02:00
usb usb: ehci-orion: Handle errors of clk_prepare_enable() in probe 2021-09-22 11:43:02 +02:00
uwb
vfio vfio/platform: fix module_put call in error flow 2021-06-10 12:42:35 +02:00
vhost vringh: Use wiov->used to check for read/write desc order 2021-09-03 09:44:40 +02:00
video fbmem: add margin check to fb_check_caps() 2021-09-03 09:44:40 +02:00
virt drivers/virt/fsl_hypervisor: Fix error handling path 2020-10-29 09:05:35 +01:00
virtio virtio: Improve vq->broken access to avoid any compiler optimization 2021-09-03 09:44:40 +02:00
vlynq
vme vme: bridges: reduce stack usage 2020-02-28 15:42:33 +01:00
w1 w1: mxc_w1: Fix timeout resolution problem leading to bus error 2020-11-10 10:23:57 +01:00
watchdog watchdog: aspeed: fix hardware timeout calculation 2021-07-20 16:21:14 +02:00
xen xen/events: Fix race in set_evtchn_to_irq 2021-08-26 08:37:23 -04:00
zorro
Kconfig
Makefile