Date: Thu, 4 Mar 2021 20:08:50 GMT From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 8ae87de4df1d - releng/13.0 - nameicap_check_dotdot: trim tracker on check Message-ID: <202103042008.124K8oY3042052@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch releng/13.0 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=8ae87de4df1ddd748883ab00666a152d3b8e7301 commit 8ae87de4df1ddd748883ab00666a152d3b8e7301 Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2021-02-28 00:15:21 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2021-03-04 20:08:02 +0000 nameicap_check_dotdot: trim tracker on check Approved by: re (gjb) (cherry picked from commit 49c98a4bf3a87ace0df99056fa683805c1645e61) --- sys/kern/vfs_lookup.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index abc01c73e24c..b4280f85c5b6 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -240,8 +240,12 @@ nameicap_check_dotdot(struct nameidata *ndp, struct vnode *dp) return (ENOTCAPABLE); TAILQ_FOREACH_REVERSE(nt, &ndp->ni_cap_tracker, nameicap_tracker_head, nm_link) { - if (dp == nt->dp) + if (dp == nt->dp) { + nt = TAILQ_NEXT(nt, nm_link); + if (nt != NULL) + nameicap_cleanup_from(ndp, nt); return (0); + } } return (ENOTCAPABLE); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202103042008.124K8oY3042052>