From: Christoph Hellwig <hch@lst.de>
To: Tal Shorer <tal.shorer@gmail.com>
Cc: "<linux-kernel@vger.kernel.org>" <linux-kernel@vger.kernel.org>,
Joel Becker <jlbec@evilplan.org>,
hch@lst.de
Subject: Re: Possible unwanted behaviour in configfs
Date: Thu, 30 Jun 2016 11:32:32 +0200 [thread overview]
Message-ID: <20160630093232.GA9287@lst.de> (raw)
In-Reply-To: <CAFDyS3MwuarsJVnR8E1OQjCF1vN4jZSs84zq-8sMysaOkQyS1g@mail.gmail.com>
On Sat, Jun 25, 2016 at 12:43:34PM +0300, Tal Shorer wrote:
> I traced this to the function configfs_read_file in fs/configfs/file.c
> and have two fixes in mind:
> 1. In fill_read_buffer(), If an error is returned by show(), don't set
> buffer->needs_read_fill to zero, making the next read() call show()
> again and either get an error or data.
> 2. Add an "err" field to struct configfs_buffer and keep the returned
> error from show() there. Any additional read() on this file will
> return this error.
>
> Any thoughts?
I think fix 1 is a good idea and I'd love to see a patch for it.
Fix 2 might be problematic as the errors don't need to be persistent,
but I think fix 1 alone should be enough anyway.
next prev parent reply other threads:[~2016-06-30 9:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-25 9:43 Possible unwanted behaviour in configfs Tal Shorer
2016-06-30 9:32 ` Christoph Hellwig [this message]
2016-07-01 9:28 ` [PATCH] fs: configfs: don't set buffer_needs_fill to zero if show() returns error Tal Shorer
2016-07-26 18:23 ` Tal Shorer
2016-07-27 11:30 ` Christoph Hellwig
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=20160630093232.GA9287@lst.de \
--to=hch@lst.de \
--cc=jlbec@evilplan.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tal.shorer@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;
as well as URLs for NNTP newsgroup(s).