From: Biren Pandya <birenpandya@gmail.com>
To: "Jonathan Cameron" <jic23@kernel.org>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Linus Walleij" <linusw@kernel.org>
Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org, Biren Pandya <birenpandya@gmail.com>
Subject: [PATCH 0/2] iio: accel: kxsd9: fix use-after-free and PM leaks
Date: Fri, 03 Jul 2026 22:53:21 +0530 [thread overview]
Message-ID: <20260703-kxsd9-v3-proper-v1-0-e9f08af25d7e@gmail.com> (raw)
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>
next reply other threads:[~2026-07-03 17:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-03 17:23 Biren Pandya [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260703-kxsd9-v3-proper-v1-0-e9f08af25d7e@gmail.com \
--to=birenpandya@gmail.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=linusw@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®