Re: [PATCH 0/2] iio: accel: kxsd9: fix use-after-free and PM leaks
From: Jonathan Cameron
Date: Sat Jul 04 2026 - 20:05:45 EST
On Fri, 03 Jul 2026 22:53:21 +0530
Biren Pandya <birenpandya@xxxxxxxxx> wrote:
> This series fixes a use-after-free during device removal and resolves
> multiple runtime PM reference leaks.
>
> Changes in v3:
> - Split the fixes into two patches (UAF fix and PM leaks fix) as
> requested by Jonathan Cameron.
> - remove(): Dropped the early return on PM resume failure. The driver now
> makes a best-effort attempt to power down the device unconditionally,
> addressing feedback from Andy Shevchenko and Jonathan Cameron.
> - read_raw(): Mirrored the -EINVAL reset fix from write_raw() to ensure
> symmetric error handling on invalid masks.
> - Dropped redundant pm_runtime_mark_last_busy() calls, relying instead
> on pm_runtime_put_autosuspend().
>
> Link to v2: https://lore.kernel.org/linux-iio/20260621193036.78549-2-birenpandya@xxxxxxxxx/
[PATCH v3 0/2] etc
Don't resend for this but please check future series for missing versions
before sending out.
Jonathan
>
> ---
> Biren Pandya (2):
> iio: accel: kxsd9: fix use-after-free on remove
> iio: accel: kxsd9: fix runtime PM leaks and unchecked returns
>
> drivers/iio/accel/kxsd9.c | 44 +++++++++++++++++++++++---------------------
> 1 file changed, 23 insertions(+), 21 deletions(-)
> ---
> base-commit: 7de6ae9e12207ec146f2f3f1e58d1a99317e88bc
> change-id: 20260703-kxsd9-v3-proper-51a1f05c4951
>
> Best regards,
> --
> Biren Pandya <birenpandya@xxxxxxxxx>
>