From: Jonathan Cameron <jic23@kernel.org>
To: Arka Mondal <arkamondalofficial@gmail.com>
Cc: Michael.Hennerich@analog.com, nuno.sa@analog.com,
andy@kernel.org, andriy.shevchenko@intel.com,
dlechner@baylibre.com, rohitsarkar5398@gmail.com,
venkat.prashanth2498@gmail.com, linux@analog.com,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 0/3] iio: adis: fix unprotected debugfs reads
Date: Sat, 22 Aug 2026 22:47:29 +0100 [thread overview]
Message-ID: <20260822224729.1d9c09c0@jic23-huawei> (raw)
In-Reply-To: <20260815182726.11796-1-arkamondalofficial@gmail.com>
On Sun, 16 Aug 2026 03:27:23 +0900
Arka Mondal <arkamondalofficial@gmail.com> wrote:
> Four open coded file operations in three ADIS drivers are passed to
> debugfs_create_file_unsafe(). None of them call debugfs_file_get(), so
> debugfs_remove_recursive() does not wait for a read in progress and
> unbind frees the iio_dev underneath it.
>
> Andy Shevchenko <andriy.shevchenko@intel.com> asked on v1 whether these
> could use DEFINE_DEBUGFS_ATTRIBUTE() instead. They cannot, as it formats
> a single u64, and these handlers print up to four registers, e.g.
> "%.4x%.4x%.4x-%.4x" in adis16136. Converting them would change what the
> files return.
>
> adis16475 and adis16550 already split this way, using
> debugfs_create_file() for their open coded firmware files and
> debugfs_create_file_unsafe() only for the DEFINE_DEBUGFS_ATTRIBUTE ones.
> This does the same for adis16480, adis16400 and adis16136.
This all makes sense to me, so I've queued this on the fixes-togreg
branch of iio.git and marked them for stable. Note that branch will be
rebased on rc1 once available. As such I don't really mind rebasing
it for tags or any feedback that comes in.
Thanks
Jonathan
>
> Compile tested only; no ADIS hardware available.
>
> Changes since v1:
> 1. patch 2: changelog rewritten to explain why serial_number cannot use
> DEFINE_DEBUGFS_ATTRIBUTE(). Code unchanged.
> 2. patches 1 and 3: unchanged, Reviewed-by added.
>
> Link to v1:
> https://lore.kernel.org/r/20260814090728.965922-1-arkamondalofficial@gmail.com
>
> Arka Mondal (3):
> iio: imu: adis16480: fix unprotected debugfs reads
> iio: imu: adis16400: fix unprotected debugfs reads
> iio: gyro: adis16136: fix unprotected debugfs reads
>
> drivers/iio/gyro/adis16136.c | 2 +-
> drivers/iio/imu/adis16400.c | 2 +-
> drivers/iio/imu/adis16480.c | 4 ++--
> 3 files changed, 4 insertions(+), 4 deletions(-)
>
>
> base-commit: 3d6d817622b0a9721e3cc404df3469171582be13
prev parent reply other threads:[~2026-08-22 21:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-15 18:27 Arka Mondal
2026-08-15 18:27 ` [PATCH v2 1/3] iio: imu: adis16480: " Arka Mondal
2026-08-15 18:27 ` [PATCH v2 2/3] iio: imu: adis16400: " Arka Mondal
2026-08-15 18:27 ` [PATCH v2 3/3] iio: gyro: adis16136: " Arka Mondal
2026-08-22 21:47 ` Jonathan Cameron [this message]
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=20260822224729.1d9c09c0@jic23-huawei \
--to=jic23@kernel.org \
--cc=Michael.Hennerich@analog.com \
--cc=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=arkamondalofficial@gmail.com \
--cc=dlechner@baylibre.com \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@analog.com \
--cc=nuno.sa@analog.com \
--cc=rohitsarkar5398@gmail.com \
--cc=venkat.prashanth2498@gmail.com \
/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®