2016-03-29 11:12:17

by Arend van Spriel

[permalink] [raw]
Subject: [REGRESSION 4.6-rc1] NFS mounts (using autofs) failing

Hi Al,

Moved to 4.6-rc1 and found NFS mounts were failing moving to the new
kernel. The NFS mounts are done using autofs. Below is the bisect log
and attached the kernel .config file. Let me know if you need any other
information.

e3c13928086f1ed3620329b9fff678df2294d327 is the first bad commit
commit e3c13928086f1ed3620329b9fff678df2294d327
Author: Al Viro <[email protected]>
Date: Sun Mar 6 14:03:27 2016 -0500

namei: massage lookup_slow() to be usable by lookup_one_len_unlocked()

Return dentry and don't pass nameidata or path; lift crossing
mountpoints
into the caller.

Signed-off-by: Al Viro <[email protected]>

:040000 040000 7687f2046ad355a994f7893271126801b5482891
a681972ad5537c045e94d5a8f8c03501a3c77e23 M fs

Regards,
Arend

--8<------------------------------------------------------------
$ git bisect log
# bad: [f55532a0c0b8bb6148f4e07853b876ef73bc69ca] Linux 4.6-rc1
# good: [b562e44f507e863c6792946e4e1b1449fbbac85d] Linux 4.5
git bisect start 'v4.6-rc1' 'v4.5'
# good: [6b5f04b6cf8ebab9a65d9c0026c650bb2538fd0f] Merge branch
'for-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup
git bisect good 6b5f04b6cf8ebab9a65d9c0026c650bb2538fd0f
# bad: [53d2e6976bd4042672ed7b90dfbf4b31635b7dcf] Merge tag
'xfs-for-linus-4.6-rc1' of
git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs
git bisect bad 53d2e6976bd4042672ed7b90dfbf4b31635b7dcf
# good: [8626c56c8279b88b91b8df55345cdf89542d5e90] bridge: fix potential
use-after-free when hook returns QUEUE or STOLEN verdict
git bisect good 8626c56c8279b88b91b8df55345cdf89542d5e90
# bad: [8c6d4082fc6ad2214e945b5b7368b828fb16e9a9] Merge tag
'armsoc-arm64' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
git bisect bad 8c6d4082fc6ad2214e945b5b7368b828fb16e9a9
# good: [de06dbfa7861c9019eedefc0c356ba86e5098f1b] Merge branch
'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm
git bisect good de06dbfa7861c9019eedefc0c356ba86e5098f1b
# bad: [e88fa1b8b00a947299e2415e819301fa52037cf4] Merge tag
'armsoc-cleanup' of
git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
git bisect bad e88fa1b8b00a947299e2415e819301fa52037cf4
# bad: [fffad3e1b34aaced7724ef513dff0d8232ad8d80] Merge tag
'xtensa-next-20160320' of git://github.com/czankel/xtensa-linux
git bisect bad fffad3e1b34aaced7724ef513dff0d8232ad8d80
# bad: [1c3d770043583d99118d52cad309f586ef8e7d4a] Merge tag
'firewire-updates' of
git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394
git bisect bad 1c3d770043583d99118d52cad309f586ef8e7d4a
# bad: [27f203f655a2e1dab66598a5b19afb637c587f0b] untangle
fsnotify_d_instantiate() a bit
git bisect bad 27f203f655a2e1dab66598a5b19afb637c587f0b
# bad: [949a852e46dda07caaa0ff02e181f55d24e3ebf8] namei: teach
lookup_slow() to skip revalidate
git bisect bad 949a852e46dda07caaa0ff02e181f55d24e3ebf8
# good: [6c51e513a3aa49db87f238f96714e6cbe2d9efd5] lookup_dcache(): lift
d_alloc() into callers
git bisect good 6c51e513a3aa49db87f238f96714e6cbe2d9efd5
# good: [74ff0ffc7f0682cb4c00252807d76116b95ecb9e] namei: simplify
invalidation logics in lookup_dcache()
git bisect good 74ff0ffc7f0682cb4c00252807d76116b95ecb9e
# bad: [e3c13928086f1ed3620329b9fff678df2294d327] namei: massage
lookup_slow() to be usable by lookup_one_len_unlocked()
git bisect bad e3c13928086f1ed3620329b9fff678df2294d327
# good: [d6d95ded914eb321b0a2c8c26cdf0a225a0d9917]
lookup_one_len_unlocked(): use lookup_dcache()
git bisect good d6d95ded914eb321b0a2c8c26cdf0a225a0d9917
# first bad commit: [e3c13928086f1ed3620329b9fff678df2294d327] namei:
massage lookup_slow() to be usable by lookup_one_len_unlocked()


Attachments:
.config (117.21 kB)

2016-03-29 14:02:49

by Al Viro

[permalink] [raw]
Subject: Re: [REGRESSION 4.6-rc1] NFS mounts (using autofs) failing

On Tue, Mar 29, 2016 at 01:11:55PM +0200, Arend Van Spriel wrote:
> Hi Al,
>
> Moved to 4.6-rc1 and found NFS mounts were failing moving to the new
> kernel. The NFS mounts are done using autofs. Below is the bisect log
> and attached the kernel .config file. Let me know if you need any other
> information.

AFAICS, it's the same one that got reported yesterday by Junichi Nomura.
Folks, could you check if the delta below fixes it?

diff --git a/fs/namei.c b/fs/namei.c
index 3498d53..0d80c72 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1740,15 +1740,17 @@ static int walk_component(struct nameidata *nd, int flags)
nd->flags);
if (IS_ERR(path.dentry))
return PTR_ERR(path.dentry);
- if (unlikely(d_is_negative(path.dentry))) {
- dput(path.dentry);
- return -ENOENT;
- }
+
path.mnt = nd->path.mnt;
err = follow_managed(&path, nd);
if (unlikely(err < 0))
return err;

+ if (unlikely(d_is_negative(path.dentry))) {
+ path_to_nameidata(&path, nd);
+ return -ENOENT;
+ }
+
seq = 0; /* we are already out of RCU mode */
inode = d_backing_inode(path.dentry);
}

2016-03-29 19:17:12

by Arend van Spriel

[permalink] [raw]
Subject: Re: [REGRESSION 4.6-rc1] NFS mounts (using autofs) failing



On 29-03-16 16:02, Al Viro wrote:
> On Tue, Mar 29, 2016 at 01:11:55PM +0200, Arend Van Spriel wrote:
>> Hi Al,
>>
>> Moved to 4.6-rc1 and found NFS mounts were failing moving to the new
>> kernel. The NFS mounts are done using autofs. Below is the bisect log
>> and attached the kernel .config file. Let me know if you need any other
>> information.
>
> AFAICS, it's the same one that got reported yesterday by Junichi Nomura.
> Folks, could you check if the delta below fixes it?

Works for me so you may add

Tested-by: Arend van Spriel <[email protected]>

Regards,
Arend

> diff --git a/fs/namei.c b/fs/namei.c
> index 3498d53..0d80c72 100644
> --- a/fs/namei.c
> +++ b/fs/namei.c
> @@ -1740,15 +1740,17 @@ static int walk_component(struct nameidata *nd, int flags)
> nd->flags);
> if (IS_ERR(path.dentry))
> return PTR_ERR(path.dentry);
> - if (unlikely(d_is_negative(path.dentry))) {
> - dput(path.dentry);
> - return -ENOENT;
> - }
> +
> path.mnt = nd->path.mnt;
> err = follow_managed(&path, nd);
> if (unlikely(err < 0))
> return err;
>
> + if (unlikely(d_is_negative(path.dentry))) {
> + path_to_nameidata(&path, nd);
> + return -ENOENT;
> + }
> +
> seq = 0; /* we are already out of RCU mode */
> inode = d_backing_inode(path.dentry);
> }
>

2016-03-29 22:37:03

by Junichi Nomura

[permalink] [raw]
Subject: Re: [REGRESSION 4.6-rc1] NFS mounts (using autofs) failing

On 03/30/16 04:17, Arend van Spriel wrote:
> On 29-03-16 16:02, Al Viro wrote:
>> On Tue, Mar 29, 2016 at 01:11:55PM +0200, Arend Van Spriel wrote:
>>> Moved to 4.6-rc1 and found NFS mounts were failing moving to the new
>>> kernel. The NFS mounts are done using autofs. Below is the bisect log
>>> and attached the kernel .config file. Let me know if you need any other
>>> information.
>>
>> AFAICS, it's the same one that got reported yesterday by Junichi Nomura.
>> Folks, could you check if the delta below fixes it?
>
> Works for me so you may add
>
> Tested-by: Arend van Spriel <[email protected]>

Yes, that works for me, too. Thank you.

Tested-by: Jun'ichi Nomura <[email protected]>

--
Jun'ichi Nomura, NEC Corporation