Skip to content
Snippets Groups Projects
Commit 3e37dc12 authored by Trond Myklebust's avatar Trond Myklebust Committed by Yang Yingliang
Browse files

NFS: finish_automount() requires us to hold 2 refs to the mount record


mainline inclusion
from mainline-v5.7-rc1
commit 75da9858
category: bugfix
bugzilla: NA
CVE: NA

--------------------------------

We must not return from nfs_d_automount() without holding 2 references
to the mount record. Doing so, will trigger the BUG() in finish_automount().
Also ensure that we don't try to reschedule the automount timer with
a negative or zero timeout value.

Fixes: 22a1ae9a ("NFS: If nfs_mountpoint_expiry_timeout < 0, do not expire submounts")
Cc: stable@vger.kernel.org # v5.5+
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>

Conflicts:
	fs/nfs/namespace.c

Signed-off-by: default avatarZhang Xiaoxu <zhangxiaoxu5@huawei.com>
Reviewed-by: default avatarZhang Yi <yi.zhang@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent 89095d99
No related branches found
No related tags found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment