OpenCloudOS-Kernel/drivers
Tanu Malhotra 38518593ec HID: intel-ish-hid: Fix kernel panic during warm reset
During warm reset device->fw_client is set to NULL. If a bus driver is
registered after this NULL setting and before new firmware clients are
enumerated by ISHTP, kernel panic will result in the function
ishtp_cl_bus_match(). This is because of reference to
device->fw_client->props.protocol_name.

ISH firmware after getting successfully loaded, sends a warm reset
notification to remove all clients from the bus and sets
device->fw_client to NULL. Until kernel v5.15, all enabled ISHTP kernel
module drivers were loaded right after any of the first ISHTP device was
registered, regardless of whether it was a matched or an unmatched
device. This resulted in all drivers getting registered much before the
warm reset notification from ISH.

Starting kernel v5.16, this issue got exposed after the change was
introduced to load only bus drivers for the respective matching devices.
In this scenario, cros_ec_ishtp device and cros_ec_ishtp driver are
registered after the warm reset device fw_client NULL setting.
cros_ec_ishtp driver_register() triggers the callback to
ishtp_cl_bus_match() to match ISHTP driver to the device and causes kernel
panic in guid_equal() when dereferencing fw_client NULL pointer to get
protocol_name.

Fixes: f155dfeaa4 ("platform/x86: isthp_eclite: only load for matching devices")
Fixes: facfe0a4fd ("platform/chrome: chros_ec_ishtp: only load for matching devices")
Fixes: 0d0cccc0fd ("HID: intel-ish-hid: hid-client: only load for matching devices")
Fixes: 44e2a58cb8 ("HID: intel-ish-hid: fw-loader: only load for matching devices")
Cc: <stable@vger.kernel.org> # 5.16+
Signed-off-by: Tanu Malhotra <tanu.malhotra@intel.com>
Tested-by: Shaunak Saha <shaunak.saha@intel.com>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2023-03-28 14:04:03 +02:00
..
accel Fix mismerge due to devnode now taking a 'const *' device 2022-12-16 13:04:15 -06:00
accessibility tty: fix possible null-ptr-defer in spk_ttyio_release 2023-01-19 16:24:04 +01:00
acpi arm64 updates for 6.3: 2023-02-21 15:27:48 -08:00
amba ARM updates for 6.2 2022-12-13 15:22:14 -08:00
android fs: port ->rename() to pass mnt_idmap 2023-01-19 09:24:26 +01:00
ata ARM: unused boardfile removal for 6.3 2023-02-20 15:28:57 -08:00
atm treewide: Convert del_timer*() to timer_shutdown*() 2022-12-25 13:38:09 -08:00
auxdisplay
base regmap: Updates for v6.3 2023-02-22 10:42:55 -08:00
bcma
block for-6.3/block-2023-02-16 2023-02-20 14:27:21 -08:00
bluetooth Bluetooth: btintel: Set Per Platform Antenna Gain(PPAG) 2023-02-09 14:20:04 -08:00
bus bus: sunxi-rsb: Fix error handling in sunxi_rsb_init() 2023-01-08 21:35:01 +01:00
cdrom
char This update includes the following changes: 2023-02-21 18:10:50 -08:00
clk Scheduler updates in this cycle are: 2023-02-20 17:41:08 -08:00
clocksource Updates for timekeeping, timers and clockevent/source drivers: 2023-02-21 09:45:13 -08:00
comedi comedi: adv_pci1760: Fix PWM instruction handling 2023-01-19 17:24:47 +01:00
connector
counter counter: stm32-lptimer-cnt: fix the check on arr and cmp registers update 2022-11-26 16:49:28 -05:00
cpufreq ACPI updates for 6.3-rc1 2023-02-21 12:23:24 -08:00
cpuidle Power management updates for 6.3-rc1 2023-02-21 12:13:58 -08:00
crypto This update includes the following changes: 2023-02-21 18:10:50 -08:00
cxl cxl/region: Fix passthrough-decoder detection 2023-02-07 11:04:30 -08:00
dax RCU pull request for v6.3 2023-02-21 10:45:51 -08:00
dca
devfreq PM / devfreq: event: use devm_platform_get_and_ioremap_resource() 2022-12-05 21:57:20 +09:00
dio
dma ARM: unused boardfile removal for 6.3 2023-02-20 15:28:57 -08:00
dma-buf dma-buf: actually set signaling bit for private stub fences 2023-01-27 14:16:18 +01:00
edac - Add a driver for the RAS functionality on Xilinx's on chip memory 2023-02-21 08:10:03 -08:00
eisa
extcon Char/Misc driver changes for 6.2-rc1 2022-12-16 03:49:24 -08:00
firewire firewire: cdev: use single object to dispatch event for request to IEC 61883-1 FCP region 2023-01-23 09:17:46 +01:00
firmware arm64 updates for 6.3: 2023-02-21 15:27:48 -08:00
fpga fpga: m10bmc-sec: Fix probe rollback 2022-12-30 10:49:52 +08:00
fsi use less confusing names for iov_iter direction initializers 2022-11-25 13:01:55 -05:00
gnss driver core: make struct class.dev_uevent() take a const * 2022-11-24 17:12:15 +01:00
gpio Core changes: 2023-02-22 11:05:56 -08:00
gpu hyperv-next for v6.3. 2023-02-21 16:59:23 -08:00
greybus
hid HID: intel-ish-hid: Fix kernel panic during warm reset 2023-03-28 14:04:03 +02:00
hsi HSI: omap_ssi_core: Fix error handling in ssi_init() 2022-11-25 01:04:21 +01:00
hte
hv hyperv-next for v6.3. 2023-02-21 16:59:23 -08:00
hwmon hwmon: remove s3c driver 2023-01-16 09:26:05 +01:00
hwspinlock
hwtracing drivers/hwtracing/stm: Remove "select SRCU" 2023-02-02 16:26:05 -08:00
i2c Networking changes for 6.3. 2023-02-21 18:24:12 -08:00
i3c i3c: export SETDASA method 2022-12-11 21:25:58 +01:00
idle Power management updates for 6.3-rc1 2023-02-21 12:13:58 -08:00
iio for-linus-2023022201 2023-02-22 11:24:42 -08:00
infiniband Merge ra.kernel.org:/pub/scm/linux/kernel/git/netdev/net 2023-02-17 11:06:39 +00:00
input hyperv-next for v6.3. 2023-02-21 16:59:23 -08:00
interconnect SoC: DT changes for 6.3 2023-02-20 15:49:56 -08:00
iommu iommu/mediatek-v1: Fix an error handling path in mtk_iommu_v1_probe() 2023-01-13 13:46:32 +01:00
ipack
irqchip arm64 updates for 6.3: 2023-02-21 15:27:48 -08:00
isdn treewide: Convert del_timer*() to timer_shutdown*() 2022-12-25 13:38:09 -08:00
leds platform-drivers-x86 for v6.3-1 2023-02-21 17:32:50 -08:00
macintosh macintosh/macio-adb: check the return value of ioremap() 2022-11-24 23:12:18 +11:00
mailbox - qcom: enable sc8280xp, sm8550 and sm4250 support 2022-12-21 09:31:18 -08:00
mcb mcb: mcb-parse: fix error handing in chameleon_parse_gdd() 2022-12-02 17:48:04 +01:00
md This update includes the following changes: 2023-02-21 18:10:50 -08:00
media platform-drivers-x86 for v6.3-1 2023-02-21 17:32:50 -08:00
memory memory: mvebu-devbus: Fix missing clk_disable_unprepare in mvebu_devbus_probe() 2022-12-27 09:54:32 +01:00
memstick memstick/mspro_block: Convert to use sysfs_emit()/sysfs_emit_at() APIs 2022-12-09 10:29:58 +01:00
message
mfd sound updates for 6.3-rc1 2023-02-22 10:29:05 -08:00
misc hardening updates for v6.3-rc1 2023-02-21 11:07:23 -08:00
mmc ARM: unused boardfile removal for 6.3 2023-02-20 15:28:57 -08:00
most
mtd ARM: unused boardfile removal for 6.3 2023-02-20 15:28:57 -08:00
mux
net Networking changes for 6.3. 2023-02-21 18:24:12 -08:00
nfc nfc: pn533: Wait for out_urb's completion in pn533_usb_send_frame() 2023-01-09 07:34:13 +00:00
ntb
nubus
nvdimm nvdimm: Support sizeof(struct page) > MAX_STRUCT_PAGE_SIZE 2023-01-28 15:32:36 -08:00
nvme Networking changes for 6.3. 2023-02-21 18:24:12 -08:00
nvmem nvmem: qcom-spmi-sdam: fix module autoloading 2023-01-28 14:39:31 +01:00
of 12 hotfixes, mostly against mm/. Five of these fixes are cc:stable. 2023-02-13 14:09:20 -08:00
opp OPP: fix error checking in opp_migrate_dentry() 2023-02-08 10:40:59 +05:30
parisc parisc: pdc_stable: use strscpy() to instead of strncpy() 2023-01-09 09:51:56 +01:00
parport parport: remove ax88796 driver 2023-01-16 09:26:06 +01:00
pci hyperv-next for v6.3. 2023-02-21 16:59:23 -08:00
pcmcia pcmcia: remove unused pxa/sa1100 drivers 2023-02-01 17:23:38 +01:00
peci
perf arm64 updates for 6.3: 2023-02-21 15:27:48 -08:00
phy phy: phy-can-transceiver: Skip warning if no "max-bitrate" 2023-01-18 22:58:05 +05:30
pinctrl Core changes: 2023-02-22 11:05:56 -08:00
platform for-linus-2023022201 2023-02-22 11:24:42 -08:00
pnp PNP: Do not disable devices on suspend when they cannot be re-enabled on resume 2022-11-25 19:36:52 +01:00
power platform-drivers-x86 for v6.3-1 2023-02-21 17:32:50 -08:00
powercap Thermal control updates for 6.3-rc1 2023-02-21 12:32:05 -08:00
pps
ps3 drivers/ps3: Fix double word in comments 2022-11-24 23:31:47 +11:00
ptp ptp_qoriq: fix latency in ptp_qoriq_adjtime() operation 2023-01-20 18:20:38 -08:00
pwm pwm: Changes for v6.2-rc1 2022-12-21 09:41:28 -08:00
rapidio rapidio: devices: fix missing put_device in mport_cdev_open 2022-12-11 19:30:20 -08:00
ras
regulator regulator: Updates for v6.3 2023-02-22 10:49:32 -08:00
remoteproc remoteproc: core: Do pm_relax when in RPROC_OFFLINE state 2022-12-07 11:20:55 -07:00
reset reset: uniphier-glue: Fix possible null-ptr-deref 2023-01-03 11:30:46 +01:00
rpmsg
rtc ARM: unused boardfile removal for 6.3 2023-02-20 15:28:57 -08:00
s390 Networking changes for 6.3. 2023-02-21 18:24:12 -08:00
sbus
scsi Networking changes for 6.3. 2023-02-21 18:24:12 -08:00
sh
siox
slimbus slimbus: qcom-ngd-ctrl: reinit the reconf completion flag 2022-11-23 19:45:33 +01:00
soc Networking changes for 6.3. 2023-02-21 18:24:12 -08:00
soundwire soundwire: stream: Add specific prep/deprep commands to port_prep callback 2023-01-31 12:10:45 +00:00
spi spi: Updates for v6.3 2023-02-22 10:53:37 -08:00
spmi
ssb
staging for-linus-2023022201 2023-02-22 11:24:42 -08:00
target Networking changes for 6.3. 2023-02-21 18:24:12 -08:00
tc
tee tee: Remove call to get_kernel_pages() 2023-02-13 14:16:40 +01:00
thermal thermal/drivers/st: Remove syscfg based driver 2023-02-15 17:30:04 +01:00
thunderbolt thunderbolt: Disable XDomain lane 1 only in software connection manager 2023-01-09 10:44:43 +02:00
tty ARM: unused boardfile removal for 6.3 2023-02-20 15:28:57 -08:00
ufs scsi: ufs: core: Fix devfreq deadlocks 2023-01-18 19:08:37 -05:00
uio Drivers: hv: Make remove callback of hyperv driver void returned 2023-01-17 13:41:27 +00:00
usb ARM: unused boardfile removal for 6.3 2023-02-20 15:28:57 -08:00
vdpa Updates for this cycle were: 2023-02-20 17:18:23 -08:00
vfio vfio/type1: Respect IOMMU reserved regions in vfio_test_domain_fgsp() 2023-01-10 10:44:37 -07:00
vhost Networking changes for 6.3. 2023-02-21 18:24:12 -08:00
video hyperv-next for v6.3. 2023-02-21 16:59:23 -08:00
virt Char/Misc driver changes for 6.2-rc1 2022-12-16 03:49:24 -08:00
virtio virtio: Implementing attribute show with sysfs_emit 2022-12-28 05:28:11 -05:00
vlynq
w1 ARM: unused boardfile removal for 6.3 2023-02-20 15:28:57 -08:00
watchdog s390 updates for 6.3 merge window 2023-02-21 15:09:17 -08:00
xen Networking changes for 6.3. 2023-02-21 18:24:12 -08:00
zorro
Kconfig drivers/accel: define kconfig and register a new major 2022-11-22 13:13:51 +02:00
Makefile