[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160630093232.GA9287@lst.de>
Date: Thu, 30 Jun 2016 11:32:32 +0200
From: Christoph Hellwig <hch@....de>
To: Tal Shorer <tal.shorer@...il.com>
Cc: "<linux-kernel@...r.kernel.org>" <linux-kernel@...r.kernel.org>,
Joel Becker <jlbec@...lplan.org>, hch@....de
Subject: Re: Possible unwanted behaviour in configfs
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.
Powered by blists - more mailing lists