[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20180607183620.GU30522@ZenIV.linux.org.uk>
Date: Thu, 7 Jun 2018 19:36:20 +0100
From: Al Viro <viro@...IV.linux.org.uk>
To: "Eric W. Biederman" <ebiederm@...ssion.com>
Cc: "'tj@...nel.org'" <tj@...nel.org>,
"Hatayama, Daisuke" <d.hatayama@...fujitsu.com>,
"'gregkh@...uxfoundation.org'" <gregkh@...uxfoundation.org>,
"Okajima, Toshiyuki" <toshi.okajima@...fujitsu.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"'ebiederm@...stanetworks.com'" <ebiederm@...stanetworks.com>
Subject: Re: [CFT][PATCH] kernfs: Correct kernfs directory seeks.
On Tue, Jun 05, 2018 at 12:47:33PM -0500, Eric W. Biederman wrote:
> Sigh, I have found another issue with kernfs_fop_readdir.
>
> We are not currently protecting file->private_data with the kernfs_mutex
> or any other kind of serialization. Which means if two processes are
> calling readdir on the same file descriptor we might get unpredictable
> behavior.
>
> It doesn't look too bad and easy enough to fix, but definitely something
> to be watchful of.
As discussed off-list - this is not a problem; getdents() et.al. are
serialized on per-struct-file basis by fdget_pos() in relevant syscalls,
since all directories automatically get FMODE_ATOMIC_POS in ->f_mode.
Powered by blists - more mailing lists