diff options
| author | Sanjay Chitroda <sanjayembeddedse@gmail.com> | 2026-06-22 11:00:01 +0530 |
|---|---|---|
| committer | Jonathan Cameron <jic23@kernel.org> | 2026-07-02 20:35:46 +0100 |
| commit | 49e663471992611f586598d2bbd23f94b760f9fa (patch) | |
| tree | 21853498261b1688c3f71adb858ea99cb5a81527 /tools/perf/scripts/python/bin/stackcollapse-record | |
| parent | 724d0351cd08eb93f3cd9021c3a26ce1f1c79f7f (diff) | |
iio: light: hid-sensor-prox: Avoid race between callback setup and device exposure
The driver currently exposes the IIO device to userspace before
completing sensor hub callback registration, and similarly removes
callbacks while the device can still be accessed during teardown.
This creates a timing window where userspace may enable the buffer
before callbacks are available. In such cases:
- samples can be dropped,
- buffered reads may observe stale or no data.
Reorder probe and remove paths to ensure callbacks are active before
device exposure and are removed after device is no longer accessible.
This avoids a race window leading to data loss.
Signed-off-by: Sanjay Chitroda <sanjayembeddedse@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-record')
0 files changed, 0 insertions, 0 deletions
