From: Dan Carpenter <error27@gmail.com>
To: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: Jonathan Cameron <jic23@kernel.org>,
Maxwell Doose <m32285159@gmail.com>, Nuno Sa <nuno.sa@analog.com>,
Olivier Moysan <olivier.moysan@foss.st.com>,
David Lechner <dlechner@baylibre.com>,
Andy Shevchenko <andy@kernel.org>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] iio: backend: fix uninitialized data in debugfs
Date: Thu, 4 Jun 2026 10:45:36 +0300 [thread overview]
Message-ID: <aiEtIGOFhF8AfUCT@stanley.mountain> (raw)
In-Reply-To: <aiEpmqKwFuIMRfdl@ashevche-desk.local>
On Thu, Jun 04, 2026 at 10:30:34AM +0300, Andy Shevchenko wrote:
> On Tue, May 26, 2026 at 07:19:46PM +0100, Jonathan Cameron wrote:
> > On Mon, 25 May 2026 08:20:31 -0500
> > Maxwell Doose <m32285159@gmail.com> wrote:
> > > On Mon, May 25, 2026 at 2:17 AM Dan Carpenter <error27@gmail.com> wrote:
> > > >
> > > > If the *ppos value is non-zero then simple_write_to_buffer() will not
> > > > initialize the start of the buf[] buffer. Non-zero ppos values aren't
> > > > going to work at all. Check for that at the start of the function and
> > > > return -EINVAL.
> > >
> > > Commit message is incorrect, it looks like you're returning -ENOSPC here...
> > Tweaked and applied to the fixes-togreg branch of iio.git + marked for stable.
>
> I was stumbled over these patches by Dan. Since the file_operations for the code
> in question do not define .llseek, the seek is not supported and will return
> -ESPIPE. I'm not sure why we have these patches to begin with. Dan, can you
> elaborate on the case where the *ppos is not 0, please?
The simple_write_to_buffer() will update *ppos so partial writes are
supported in that way.
regards,
dan carpenter
next prev parent reply other threads:[~2026-06-04 7:45 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-25 7:16 [PATCH] iio: backend: fix uninitialized data in debugfs Dan Carpenter
2026-05-25 13:20 ` Maxwell Doose
2026-05-26 18:19 ` Jonathan Cameron
2026-06-04 7:30 ` Andy Shevchenko
2026-06-04 7:38 ` Andy Shevchenko
2026-06-04 7:45 ` Dan Carpenter [this message]
2026-06-04 8:03 ` Andy Shevchenko
2026-06-04 8:28 ` Andy Shevchenko
2026-06-04 10:38 ` Dan Carpenter
2026-06-04 10:42 ` Dan Carpenter
2026-06-04 14:55 ` Andy Shevchenko
2026-06-05 6:12 ` Dan Carpenter
2026-06-05 8:28 ` Andy Shevchenko
2026-06-05 14:38 ` Maxwell Doose
2026-06-04 14:52 ` Andy Shevchenko
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=aiEtIGOFhF8AfUCT@stanley.mountain \
--to=error27@gmail.com \
--cc=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=m32285159@gmail.com \
--cc=nuno.sa@analog.com \
--cc=olivier.moysan@foss.st.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.