summaryrefslogtreecommitdiff
path: root/kernel/debug
diff options
context:
space:
mode:
authorChristopher Hoover <ch@murgatroid.com>2026-10-18 19:34:19 -0700
committerJonathan Cameron <jonathan.cameron@oss.qualcomm.com>2026-11-11 02:53:02 +0000
commit36eeb26031e90eeb81bbac3d3acad61d23fcbdf3 (patch)
treeaebdad2c51283d77dc79ccadd3f6b8c581e93acb /kernel/debug
parentc72dcaeaabd60e164e7324f80ccb037e879eefdd (diff)
iio: temperature: hid-sensor-temperature: Use per-instance callbacks
hid-sensor-temperature keeps a single static struct hid_sensor_hub_callbacks for all instances and overwrites its pdev in every probe. With two temperature sensors, input reports for one are delivered with the other's platform device; once that device is removed, platform_get_drvdata() returns NULL and temperature_capture_sample() dereferences it: BUG: kernel NULL pointer dereference, address: 00000000000003a8 RIP: 0010:temperature_capture_sample+0xd/0x50 [hid_sensor_temperature] The oops happens in sensor_hub_raw_event() with the hub's spinlock held, so the hub's removal then hangs. It reproduces with two uhid devices that each declare a temperature sensor, one destroyed while the other still sends input reports. Keep the callbacks in struct temperature_state, as the other HID sensor drivers (accel, gyro, als, ...) do. Fixes: 59d0f2da3569 ("iio: hid: Add temperature sensor support") Cc: stable@vger.kernel.org Signed-off-by: Christopher Hoover <ch@murgatroid.com> Reviewed-by: Joshua Crofts <joshua.crofts1@gmail.com> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
Diffstat (limited to 'kernel/debug')
0 files changed, 0 insertions, 0 deletions