android_kernel_xiaomi_sm8450/drivers
Russ Weight f00cd687c2 regmap: spi-avmm: Fix regmap_bus max_raw_write
[ Upstream commit c8e796895e2310b6130e7577248da1d771431a77 ]

The max_raw_write member of the regmap_spi_avmm_bus structure is defined
as:
	.max_raw_write = SPI_AVMM_VAL_SIZE * MAX_WRITE_CNT

SPI_AVMM_VAL_SIZE == 4 and MAX_WRITE_CNT == 1 so this results in a
maximum write transfer size of 4 bytes which provides only enough space to
transfer the address of the target register. It provides no space for the
value to be transferred. This bug became an issue (divide-by-zero in
_regmap_raw_write()) after the following was accepted into mainline:

commit 3981514180c9 ("regmap: Account for register length when chunking")

Change max_raw_write to include space (4 additional bytes) for both the
register address and value:

	.max_raw_write = SPI_AVMM_REG_SIZE + SPI_AVMM_VAL_SIZE * MAX_WRITE_CNT

Fixes: 7f9fb67358 ("regmap: add Intel SPI Slave to AVMM Bus Bridge support")
Reviewed-by: Matthew Gerlach <matthew.gerlach@linux.intel.com>
Signed-off-by: Russ Weight <russell.h.weight@intel.com>
Link: https://lore.kernel.org/r/20230620202824.380313-1-russell.h.weight@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-06-28 10:28:08 +02:00
..
accessibility speakup: fix a segfault caused by switching consoles 2022-11-25 17:45:50 +01:00
acpi ACPI: thermal: drop an always true check 2023-06-09 10:30:15 +02:00
amba
android binder: fix UAF caused by faulty buffer cleanup 2023-06-05 09:07:04 +02:00
ata ata: ahci: fix enum constants for gcc-13 2023-06-14 11:09:29 +02:00
atm atm: idt77252: fix kmemleak when rmmod idt77252 2023-04-05 11:23:35 +02:00
auxdisplay
base regmap: spi-avmm: Fix regmap_bus max_raw_write 2023-06-28 10:28:08 +02:00
bcma
block xen/blkfront: Only check REQ_FUA for writes 2023-06-21 15:45:36 +02:00
bluetooth Bluetooth: hci_qca: fix debugfs registration 2023-06-14 11:09:52 +02:00
bus bus: imx-weim: fix branch condition evaluates to a garbage value 2023-04-05 11:23:44 +02:00
cdrom
char parisc: Flush gatt writes and adjust gatt mask in parisc_agp_mask_memory() 2023-06-21 15:45:36 +02:00
clk clk: tegra20: fix gcc-7 constant overflow warning 2023-05-30 12:57:50 +01:00
clocksource clocksource/drivers/davinci: Fix memory leak in davinci_timer_register when init fails 2023-05-17 11:48:03 +02:00
connector
counter counter: 104-quad-8: Fix race condition between FLAG and CNTR reads 2023-05-17 11:47:28 +02:00
cpufreq cpufreq: armada-37xx: stop using 0 as NULL pointer 2023-02-01 08:23:17 +01:00
cpuidle cpuidle: psci: Iterate backwards over list in psci_pd_remove() 2023-03-22 13:30:05 +01:00
crypto crypto: ccp: Play nice with vmalloc'd memory for SEV command structs 2023-06-09 10:30:18 +02:00
dax dax/kmem: Fix leak of memory-hotplug resources 2023-03-11 16:40:04 +01:00
dca
devfreq PM/devfreq: governor: Add a private governor_data for governor 2023-01-14 10:16:31 +01:00
dio drivers: dio: fix possible memory leak in dio_init() 2023-01-14 10:15:54 +01:00
dma dmaengine: pl330: rename _start to prevent build error 2023-06-09 10:30:04 +02:00
dma-buf dma-buf: fix racing conflict of dma_heap_add() 2022-12-02 17:40:01 +01:00
edac EDAC/skx: Fix overflows on the DRAM row address mapping arrays 2023-05-17 11:47:39 +02:00
eisa
extcon extcon: Modify extcon device to be created after driver data is set 2022-06-14 18:32:43 +02:00
firewire firewire: fix memory leak for payload of request subaction to IEC 61883-1 FCP region 2023-02-15 17:22:09 +01:00
firmware firmware: arm_sdei: Fix sleep from invalid context BUG 2023-05-30 12:57:48 +01:00
fpga fpga: bridge: fix kernel-doc parameter description 2023-05-17 11:47:55 +02:00
fsi WRITE is "data source", not destination... 2023-02-15 17:22:11 +01:00
gnss
gpio gpio: mockup: Fix mode of debugfs files 2023-05-30 12:57:57 +01:00
gpu drm/amd/display: fix the system hang while disable PSR 2023-06-28 10:28:06 +02:00
greybus
hid HID: wacom: avoid integer overflow in wacom_intuos_inout() 2023-06-09 10:30:13 +02:00
hsi HSI: omap_ssi_core: Fix error handling in ssi_init() 2023-01-14 10:16:03 +01:00
hv Drivers: hv: vmbus: Fix vmbus_wait_for_unload() to scan present CPUs 2023-06-28 10:28:07 +02:00
hwmon hwmon: (adt7475) Use device_property APIs when configuring polarity 2023-05-17 11:47:31 +02:00
hwspinlock hwspinlock: qcom: correct MMIO max register for newer SoCs 2022-11-16 09:57:07 +01:00
hwtracing coresight: Fix signedness bug in tmc_etr_buf_insert_barrier_packet() 2023-05-30 12:57:58 +01:00
i2c i2c: sprd: Delete i2c adapter in .remove's error path 2023-06-14 11:09:56 +02:00
i3c
ide
idle intel_idle: Disable IBRS during long idle 2022-07-25 11:26:43 +02:00
iio iio: dac: build ad5758 driver when AD5758 is selected 2023-06-09 10:30:14 +02:00
infiniband IB/isert: Fix incorrect release of isert connection 2023-06-21 15:45:39 +02:00
input Input: psmouse - fix OOB access in Elantech protocol 2023-06-14 11:09:47 +02:00
interconnect interconnect: qcom: osm-l3: fix icc_onecell_data allocation 2023-04-05 11:23:29 +02:00
iommu iommu/amd: Don't block updates to GATag if guest mode is on 2023-06-09 10:30:04 +02:00
ipack
irqchip irqchip/gic: Correctly validate OF quirk descriptors 2023-06-21 15:45:37 +02:00
isdn mISDN: hfcmulti: don't call dev_kfree_skb/kfree_skb() under spin_lock_irqsave() 2023-01-14 10:16:10 +01:00
leds leds: tca6507: Fix error handling of using fwnode_property_read_string 2023-05-17 11:48:04 +02:00
lightnvm
macintosh macintosh: via-pmu-led: requires ATA to be set 2023-05-17 11:48:00 +02:00
mailbox mailbox: mailbox-test: fix a locking issue in mbox_test_message_write() 2023-06-09 10:30:12 +02:00
mcb mcb-pci: Reallocate memory region to avoid memory overlapping 2023-05-30 12:57:50 +01:00
md dm verity: fix error handling for check_at_most_once on FEC 2023-05-17 11:48:10 +02:00
media media: dvb-core: Fix use-after-free due to race at dvb_register_device() 2023-06-21 15:45:41 +02:00
memory memory: mvebu-devbus: Fix missing clk_disable_unprepare in mvebu_devbus_probe() 2023-02-01 08:23:08 +01:00
memstick memstick: r592: Fix UAF bug in r592_remove due to race condition 2023-05-30 12:57:48 +01:00
message scsi: message: mptlan: Fix use after free bug in mptlan_remove() due to race condition 2023-05-30 12:57:49 +01:00
mfd mfd: dln2: Fix memory leak in dln2_probe() 2023-05-30 12:57:51 +01:00
misc eeprom: at24: also select REGMAP 2023-06-14 11:09:57 +02:00
mmc mmc: mmci: stm32: fix max busy timeout calculation 2023-06-28 10:28:08 +02:00
most
mtd mtd: rawnand: marvell: don't set the NAND frequency select 2023-06-09 10:30:07 +02:00
mux
net net: lapbether: only support ethernet devices 2023-06-21 15:45:40 +02:00
nfc nfc: st-nci: Fix use after free bug in ndlc_remove due to race condition 2023-03-22 13:29:58 +01:00
ntb NTB: ntb_tool: uninitialized heap data in tool_fn_write() 2022-08-25 11:38:01 +02:00
nubus
nvdimm nvdimm: Fix badblocks clear off-by-one error 2022-07-07 17:52:15 +02:00
nvme nvme-fcloop: fix "inconsistent {IN-HARDIRQ-W} -> {HARDIRQ-ON-W} usage" 2023-05-17 11:47:51 +02:00
nvmem nvmem: core: fix return value 2023-02-22 12:56:00 +01:00
of of: Fix modalias string generation 2023-05-17 11:47:56 +02:00
opp OPP: fix error checking in opp_migrate_dentry() 2023-03-11 16:39:26 +01:00
oprofile
parisc parisc: led: Fix potential null-ptr-deref in start_task() 2023-01-14 10:16:36 +01:00
parport parport_pc: Avoid FIFO port location truncation 2022-11-25 17:45:44 +01:00
pci PCI: hv: Fix a race condition in hv_irq_unmask() that can cause panic 2023-06-28 10:28:07 +02:00
pcmcia pcmcia: db1xxx_ss: restrict to MIPS_DB1XXX boards 2022-06-14 18:32:30 +02:00
perf perf/smmuv3: Fix hotplug callback leak in arm_smmu_pmu_init() 2023-01-14 10:15:12 +01:00
phy phy: st: miphy28lp: use _poll_timeout functions for waits 2023-05-30 12:57:51 +01:00
pinctrl pinctrl: meson-axg: add missing GPIOA_18 gpio group 2023-06-14 11:09:54 +02:00
platform platform/x86: asus-wmi: Ignore WMI events with codes 0x7B, 0xC0 2023-06-21 15:45:36 +02:00
pnp PNP: fix name memory leak in pnp_alloc_dev() 2023-01-14 10:15:17 +01:00
power power: supply: Fix logic checking if system is running from battery 2023-06-21 15:45:36 +02:00
powercap powercap: fix possible name leak in powercap_register_zone() 2023-03-11 16:39:23 +01:00
pps
ps3
ptp ptp_qoriq: fix memory leak in probe() 2023-04-05 11:23:47 +02:00
pwm pwm: mtk-disp: Disable shadow registers before setting backlight values 2023-05-17 11:48:04 +02:00
rapidio rapidio: devices: fix missing put_device in mport_cdev_open 2023-01-14 10:15:23 +01:00
ras
regulator regulator: Fix error checking for debugfs_create_dir 2023-06-21 15:45:36 +02:00
remoteproc remoteproc: stm32_rproc: Add mutex protection for workqueue 2023-05-30 12:57:48 +01:00
reset reset: imx7: Fix the iMX8MP PCIe PHY PERST support 2022-10-05 10:38:40 +02:00
rpmsg rpmsg: glink: Avoid infinite loop on intent for missing channel 2023-03-11 16:39:47 +01:00
rtc rtc: meson-vrtc: Use ktime_get_real_ts64() to get the current time 2023-05-17 11:48:01 +02:00
s390 s390/dasd: Use correct lock while counting channel queue length 2023-06-14 11:09:51 +02:00
sbus
scsi scsi: dpt_i2o: Do not process completions with invalid addresses 2023-06-09 10:30:18 +02:00
sfi
sh
siox siox: fix possible memory leak in siox_device_add() 2022-11-25 17:45:44 +01:00
slimbus slimbus: stream: correct presence rate frequencies 2022-11-25 17:45:50 +01:00
soc soc: ti: pm33xx: Fix refcount leak in am33xx_pm_probe 2023-05-17 11:47:39 +02:00
soundwire soundwire: cadence: Drain the RX FIFO after an IO timeout 2023-03-11 16:40:18 +01:00
spi spi: fsl-dspi: avoid SCK glitches with continuous transfers 2023-06-21 15:45:38 +02:00
spmi spmi: Add a check for remove callback when removing a SPMI driver 2023-05-17 11:47:59 +02:00
ssb
staging Revert "staging: rtl8192e: Replace macro RTL_PCI_DEVICE with PCI_DEVICE" 2023-06-14 11:10:02 +02:00
target scsi: target: iscsit: Free cmds before session free 2023-05-30 12:57:49 +01:00
tc
tee tee: amdtee: Add return_origin to 'struct tee_cmd_load_ta' 2023-06-14 11:09:53 +02:00
thermal thermal/drivers/mediatek: Use devm_of_iomap to avoid resource leak in mtk_thermal_probe 2023-05-17 11:48:05 +02:00
thunderbolt thunderbolt: Use const qualifier for ring_interrupt_index 2023-04-05 11:23:37 +02:00
tty serial: lantiq: add missing interrupt ack 2023-06-21 15:45:38 +02:00
uio uio: uio_dmem_genirq: Fix deadlock between irq config and handling 2023-01-14 10:15:55 +01:00
usb usb: dwc3: gadget: Reset num TRBs before giving back the request 2023-06-21 15:45:38 +02:00
vdpa vdpa/mlx5: Don't clear mr struct on destroy MR 2023-03-11 16:39:45 +01:00
vfio vfio/type1: prevent underflow of locked_vm via exec() 2023-03-11 16:40:07 +01:00
vhost vhost: support PACKED when setting-getting vring_base 2023-06-14 11:09:57 +02:00
video fbcon: Fix null-ptr-deref in soft_cursor 2023-06-09 10:30:17 +02:00
virt vboxguest: Do not use devm for irq 2022-08-25 11:38:14 +02:00
virtio virtio_mmio: Restore guest page size on resume 2022-07-21 21:20:13 +02:00
visorbus
vlynq
vme vme: Fix error not catched in fake_init() 2023-01-14 10:16:00 +01:00
w1 w1: fix WARNING after calling w1_process() 2023-02-01 08:23:15 +01:00
watchdog watchdog: menz069_wdt: fix watchdog initialisation 2023-06-09 10:30:07 +02:00
xen xen/pvcalls-back: fix double frees with pvcalls_new_active_socket() 2023-05-30 12:57:58 +01:00
zorro
Kconfig
Makefile