mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] iio: accel: kxsd9: fix use-after-free and PM leaks
@ 2026-07-03 17:23 Biren Pandya
  2026-07-03 17:23 ` [PATCH 1/2] iio: accel: kxsd9: fix use-after-free on remove Biren Pandya
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Biren Pandya @ 2026-07-03 17:23 UTC (permalink / raw)
  To: Jonathan Cameron, David Lechner, Nuno Sá,
	Andy Shevchenko, Linus Walleij
  Cc: linux-iio, linux-kernel, stable, Biren Pandya

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@gmail.com/

---
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@gmail.com>


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-07-05  0:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-03 17:23 [PATCH 0/2] iio: accel: kxsd9: fix use-after-free and PM leaks Biren Pandya
2026-07-03 17:23 ` [PATCH 1/2] iio: accel: kxsd9: fix use-after-free on remove Biren Pandya
2026-07-05  0:09   ` Jonathan Cameron
2026-07-03 17:23 ` [PATCH 2/2] iio: accel: kxsd9: fix runtime PM leaks and unchecked returns Biren Pandya
2026-07-05  0:19   ` Jonathan Cameron
2026-07-05  0:05 ` [PATCH 0/2] iio: accel: kxsd9: fix use-after-free and PM leaks Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®