[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMXgnP5zpQUZFUusZD-mHgG19GK7n4Mm=9ZQ-nOO56nOMh9vDw@mail.gmail.com>
Date: Wed, 14 Oct 2015 16:47:49 +0200
From: Alban Crequy <alban.crequy@...il.com>
To: Miklos Szeredi <miklos@...redi.hu>
Cc: David Howells <dhowells@...hat.com>, sds@...ho.nsa.gov,
Alexander Viro <viro@...iv.linux.org.uk>,
linux-fsdevel@...r.kernel.org,
LSM <linux-security-module@...r.kernel.org>,
linux-unionfs@...r.kernel.org,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Iago López Galeiras <iaguis@...il.com>
Subject: Re: overlayfs: regression bug from 4bacc9c9 (Make f_path always point
to the overlay and f_inode to the underlay)
On 12 October 2015 at 15:50, Miklos Szeredi <miklos@...redi.hu> wrote:
> On Wed, Oct 07, 2015 at 02:23:23PM +0200, Alban Crequy wrote:
>> Hi,
>>
>> I'm reporting an issue in overlay fs that was introduced in v4.2 (it
>> worked on v4.1): when overlay fs is mounted inside a overlay fs, I get
>> a "no such device or address" error (ENXIO) during open(). After
>> adding some debug printks, I found that the ENXIO comes from
>> fs/inode.c:no_open().
>>
>> The bug was initially reported on:
>> https://github.com/coreos/rkt/issues/1537
>>
>> The following commands can reproduce the issue:
>
> Thanks for the excellent report.
>
> See below for a fix. Please let me know if you see any issues.
Thanks for the fix. I tested it and it fixes the test case with the
commands I wrote in my previous email.
Tested-by: Alban Crequy <alban.crequy@...il.com>
> Thanks,
> Miklos
> ---
>
> Subject: ovl: fix open in stacked overlay
> From: Miklos Szeredi <mszeredi@...e.cz>
>
> If two overlayfs filesystems are stacked on top of each other, then we need
> recursion in ovl_d_select_inode().
>
> I guess d_backing_inode() is supposed to do that. But currently it doesn't
> and that functionality is open coded in vfs_open(). This is now copied
> into ovl_d_select_inode() to fix this regression.
>
> Reported-by: Alban Crequy <alban.crequy@...il.com>
> Signed-off-by: Miklos Szeredi <mszeredi@...e.cz>
> Fixes: 4bacc9c9234c ("overlayfs: Make f_path always point to the overlay...")
> Cc: David Howells <dhowells@...hat.com>
> Cc: <stable@...r.kernel.org> # v4.2+
> ---
> fs/overlayfs/inode.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> --- a/fs/overlayfs/inode.c
> +++ b/fs/overlayfs/inode.c
> @@ -363,6 +363,9 @@ struct inode *ovl_d_select_inode(struct
> ovl_path_upper(dentry, &realpath);
> }
>
> + if (realpath.dentry->d_flags & DCACHE_OP_SELECT_INODE)
> + return realpath.dentry->d_op->d_select_inode(realpath.dentry, file_flags);
> +
> return d_backing_inode(realpath.dentry);
> }
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists