Re: [PATCH v2 0/7] HID: sensor: custom: use-after-freec after remove

From: Jonathan Cameron

Date: Sat Nov 07 2026 - 15:09:12 EST


On Wed, 4 Nov 2026 12:13:56 -0800
Srinivas Pandruvada <srinivas.pandruvada@xxxxxxxxxxxxxxx> wrote:

Trivial but freec in the title. If we end up having a v3, please
tidy that up.,

> This is v2 for patch " [PATCH] HID: sensor-custom: Synchronize
> misc-device teardown with file lifetime".
>
> This patch series is essentially the same version that was sent to
> Семён for testing.
>
> Following a feedback review conducted with various AI models, it was
> suggested to break each change into individual, separate patches. This
> makes perfect sense, which is why this series now contains more patches.
>
> Additionally, these reviews identified issues in the adjacent probe and
> removal code when active sensor instances are present. I have addressed
> those issues in this version as well.
>
> Srinivas Pandruvada (7):
> HID: sensor: hub: Synchronize callback removal with raw events
> HID: sensor: custom: Set owner for misc device
> HID: sensor: custom: Disable sensor before hub close on removal
> HID: sensor: custom: Fix state lifetime during removal
> HID: sensor: custom: Serialize misc device reads
> HID: sensor: custom: Register enable attribute after misc device
> HID: sensor: hub: Remove clients before stopping hardware
>
> drivers/hid/hid-sensor-custom.c | 121 +++++++++++++++++++++++---------
> drivers/hid/hid-sensor-hub.c | 27 +++++--
> 2 files changed, 110 insertions(+), 38 deletions(-)
>