twx-linux/drivers
Heiko Stuebner 8a5b38c3fd HID: hid-sensor-hub: don't use stale platform-data on remove
The hid-sensor-hub creates the individual device structs and transfers them
to the created mfd platform-devices via the platform_data in the mfd_cell.

Before e651a1da442a ("HID: hid-sensor-hub: Allow parallel synchronous reads")
the sensor-hub was managing access centrally, with one "completion" in the
hub's data structure, which needed to be finished on removal at the latest.

The mentioned commit then moved this central management to each hid sensor
device, resulting on a completion in each struct hid_sensor_hub_device.
The remove procedure was adapted to go through all sensor devices and
finish any pending "completion".

What this didn't take into account was, platform_device_add_data() that is
used by mfd_add{_hotplug}_devices() does a kmemdup on the submitted
platform-data. So the data the platform-device gets is a copy of the
original data, meaning that the device worked on a different completion
than what sensor_hub_remove() currently wants to access.

To fix that, use device_for_each_child() to go through each child-device
similar to how mfd_remove_devices() unregisters the devices later and
with that get the live platform_data to finalize the correct completion.

Fixes: e651a1da442a ("HID: hid-sensor-hub: Allow parallel synchronous reads")
Cc: stable@vger.kernel.org
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Acked-by: Benjamin Tissoires <bentiss@kernel.org>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Acked-by: Jiri Kosina <jkosina@suse.com>
Link: https://lore.kernel.org/r/20241107114712.538976-2-heiko@sntech.de
Signed-off-by: Lee Jones <lee@kernel.org>
2024-12-17 13:14:06 +00:00
..
accel
accessibility
acpi power supply and reset changes for the 6.13 series 2024-11-28 09:28:09 -08:00
amba ARM: 9415/1: amba: Add dev_is_amba() function and export it for modules 2024-11-12 16:41:45 +00:00
android Char/Misc/IIO/Whatever driver subsystem updates for 6.13-rc1 2024-11-29 11:58:27 -08:00
ata pci-v6.13-changes 2024-11-26 18:05:44 -08:00
atm
auxdisplay auxdisplay for v6.13-1 2024-11-20 12:55:41 -08:00
base Driver core changes for 6.13-rc1 2024-11-29 11:43:29 -08:00
bcma
block block-6.13-20242901 2024-11-30 15:47:29 -08:00
bluetooth Networking changes for 6.13. 2024-11-21 08:28:08 -08:00
bus Char/Misc/IIO/Whatever driver subsystem updates for 6.13-rc1 2024-11-29 11:58:27 -08:00
cache
cdrom
cdx cdx: Fix cdx_mmap_resource() after constifying attr in ->mmap() 2024-11-10 10:53:21 +01:00
char Char/Misc/IIO/Whatever driver subsystem updates for 6.13-rc1 2024-11-29 11:58:27 -08:00
clk The core framework gained a clk provider helper, a clk consumer helper, and 2024-11-22 17:02:25 -08:00
clocksource clocksource/drivers/arm_arch_timer: Use of_property_present() for non-boolean properties 2024-11-13 13:49:33 +01:00
comedi
connector
counter
cpufreq powerpc updates for 6.13 2024-11-23 10:44:31 -08:00
cpuidle RISC-V Paches for the 6.13 Merge Window, Part 1 2024-11-27 11:19:09 -08:00
crypto pci-v6.13-changes 2024-11-26 18:05:44 -08:00
cxl Driver core changes for 6.13-rc1 2024-11-29 11:43:29 -08:00
dax libnvdimm additions for 6.13 2024-11-25 18:31:48 -08:00
dca
devfreq
dio
dma dmaengine updates for v6.13 2024-11-27 13:25:47 -08:00
dma-buf
dpll
edac powerpc updates for 6.13 2024-11-23 10:44:31 -08:00
eisa
extcon
firewire firewire updates for v6.13 2024-11-25 17:12:54 -08:00
firmware Char/Misc/IIO/Whatever driver subsystem updates for 6.13-rc1 2024-11-29 11:58:27 -08:00
fpga Char/Misc/IIO/Whatever driver subsystem updates for 6.13-rc1 2024-11-29 11:58:27 -08:00
fsi
gnss
gpio Driver core changes for 6.13-rc1 2024-11-29 11:43:29 -08:00
gpu drm fixes for v6.13-rc1 2024-11-29 13:06:06 -08:00
greybus
hid HID: hid-sensor-hub: don't use stale platform-data on remove 2024-12-17 13:14:06 +00:00
hsi
hte
hv
hwmon hwmon: (aquacomputer_d5next) Fix length of speed_input array 2024-11-24 07:36:47 -08:00
hwspinlock
hwtracing
i2c i2c: Fix whitespace style issue 2024-11-27 12:23:43 +01:00
i3c i3c: Use i3cdev->desc->info instead of calling i3c_device_get_info() to avoid deadlock 2024-11-18 14:29:13 +01:00
idle intel_idle: add Granite Rapids Xeon D support 2024-11-11 15:48:50 +01:00
iio Char/Misc/IIO/Whatever driver subsystem updates for 6.13-rc1 2024-11-29 11:58:27 -08:00
infiniband Driver core changes for 6.13-rc1 2024-11-29 11:43:29 -08:00
input Input updates for v6.13-rc0 2024-11-25 10:31:39 -08:00
interconnect
iommu iommufd 6.13 merge window pull #2 2024-11-27 14:24:34 -08:00
ipack
irqchip - Move the ->select callback to the correct ops structure in irq-mvebu-sei to 2024-12-01 12:37:58 -08:00
isdn mISDN: Fix typos 2024-11-09 09:14:12 -08:00
leds - Removed unused local header files from various drivers. 2024-11-22 16:25:20 -08:00
macintosh macintosh: Use common error handling code in via_pmu_led_init() 2024-11-14 22:54:28 +11:00
mailbox TTY / Serial driver updates for 6.13-rc1 2024-11-30 09:03:16 -08:00
mcb
md block-6.13-20242901 2024-11-30 15:47:29 -08:00
media media updates for v6.13-rc1 2024-11-20 14:05:34 -08:00
memory
memstick
message
mfd - Several drivers, including atmel-flexcom/rk8xx-core, palmas, and 2024-11-22 16:19:47 -08:00
misc TTY / Serial driver updates for 6.13-rc1 2024-11-30 09:03:16 -08:00
mmc MMC core: 2024-11-20 12:51:32 -08:00
most
mtd This pull request contains updates for JFFS2, UBI and UBIFS: 2024-11-30 10:32:47 -08:00
mux
net Including fixes from bluetooth. 2024-11-28 10:15:20 -08:00
nfc
ntb
nubus
nvdimm virtio: features, fixes, cleanups 2024-11-27 13:11:58 -08:00
nvme block-6.13-20242901 2024-11-30 15:47:29 -08:00
nvmem Char/Misc/IIO/Whatever driver subsystem updates for 6.13-rc1 2024-11-29 11:58:27 -08:00
of i2c-for-6.13-rc1-part3 2024-12-01 13:38:24 -08:00
opp Additional power management updates for 6.13-rc1 2024-11-27 14:40:33 -08:00
parisc
parport
pci pci-v6.13-fixes-1 2024-11-30 18:23:05 -08:00
pcmcia pcmcia: soc_common: Avoid using GPIOF_ACTIVE_LOW 2024-11-09 14:55:33 +01:00
peci
perf arm64 fixes for 6.13-rc1: 2024-11-30 14:33:44 -08:00
phy Driver core changes for 6.13-rc1 2024-11-29 11:43:29 -08:00
pinctrl Driver core changes for 6.13-rc1 2024-11-29 11:43:29 -08:00
platform i2c-for-6.13-rc1-part3 2024-12-01 13:38:24 -08:00
pmdomain pmdomain: qcom: rpmhpd: Add rpmhpd support for SM8750 2024-11-12 19:46:51 +01:00
pnp
power power supply and reset changes for the 6.13 series 2024-11-28 09:28:09 -08:00
powercap
pps
ps3 ps3: Correct some typos in comments 2024-11-15 00:32:29 +11:00
ptp
pwm
rapidio
ras
regulator regulator: Fixes for v6.13 2024-11-28 09:40:53 -08:00
remoteproc remoteproc: qcom: wcss: Remove double assignment in q6v5_wcss_probe() 2024-11-15 20:36:27 -08:00
reset The core framework gained a clk provider helper, a clk consumer helper, and 2024-11-22 17:02:25 -08:00
rpmsg rpmsg updates for v6.13 2024-11-26 18:36:55 -08:00
rtc RTC for 6.13 2024-11-30 11:18:16 -08:00
s390 Driver core changes for 6.13-rc1 2024-11-29 11:43:29 -08:00
sbus
scsi Driver core changes for 6.13-rc1 2024-11-29 11:43:29 -08:00
sh sh updates for v6.13 2024-11-30 14:45:29 -08:00
siox
slimbus
soc Networking changes for 6.13. 2024-11-21 08:28:08 -08:00
soundwire soundwire updates for 6.13 2024-11-27 13:38:09 -08:00
spi spi: Fixes for v6.13 2024-11-28 10:06:00 -08:00
spmi spmi: pmic-arb: fix return path in for_each_available_child_of_node() 2024-11-10 10:56:46 +01:00
ssb
staging Char/Misc/IIO/Whatever driver subsystem updates for 6.13-rc1 2024-11-29 11:58:27 -08:00
target SCSI misc on 20241125 2024-11-25 18:50:55 -08:00
tc TC: Fix the wrong format specifier 2024-11-12 15:48:08 +01:00
tee
thermal Additional thermal control updates for 6.13-rc1 2024-11-27 14:36:00 -08:00
thunderbolt USB / Thunderbolt (USB4) changes for 6.13-rc1 2024-11-29 11:19:31 -08:00
tty TTY / Serial driver updates for 6.13-rc1 2024-11-30 09:03:16 -08:00
ufs SCSI misc on 20241125 2024-11-25 18:50:55 -08:00
uio Char/Misc/IIO/Whatever driver subsystem updates for 6.13-rc1 2024-11-29 11:58:27 -08:00
usb Kbuild updates for v6.13 2024-11-30 13:41:50 -08:00
vdpa vdpa/mlx5: Fix suboptimal range on iotlb iteration 2024-11-12 18:05:05 -05:00
vfio VFIO updates for v6.13 2024-11-27 12:57:03 -08:00
vhost mm: page_frag: avoid caller accessing 'page_frag_cache' directly 2024-11-11 10:56:27 -08:00
video fbdev fixes and updates for 6.13-rc1: 2024-11-25 12:07:45 -08:00
virt - Do the proper memory conversion of guest memory in order to be able to kexec 2024-11-19 12:21:35 -08:00
virtio virtio: features, fixes, cleanups 2024-11-27 13:11:58 -08:00
w1
watchdog asm-generic updates for 6.13 2024-11-20 15:13:02 -08:00
xen A set of updates for the interrupt subsystem: 2024-11-19 15:54:19 -08:00
zorro
Kconfig
Makefile