Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Mar 2021 19:25:01 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: 11c6aa5c504d - stable/13 - nameicap_tracker_add: avoid duplicates in the tracker list
Message-ID:  <202103041925.124JP18S087997@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=11c6aa5c504d76e50dcd9481020c0f350ce0bb00

commit 11c6aa5c504d76e50dcd9481020c0f350ce0bb00
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2021-02-28 00:13:19 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2021-03-04 19:11:00 +0000

    nameicap_tracker_add: avoid duplicates in the tracker list
    
    (cherry picked from commit 2388ad7c293fbc89ee239a1adcb87fd158c4e8e9)
---
 sys/kern/vfs_lookup.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c
index 73290e8da05f..cdd4a914239f 100644
--- a/sys/kern/vfs_lookup.c
+++ b/sys/kern/vfs_lookup.c
@@ -182,6 +182,9 @@ nameicap_tracker_add(struct nameidata *ndp, struct vnode *dp)
 	if ((ndp->ni_lcf & NI_LCF_CAP_DOTDOT) == 0 || dp->v_type != VDIR)
 		return;
 	cnp = &ndp->ni_cnd;
+	nt = TAILQ_LAST(&ndp->ni_cap_tracker, nameicap_tracker_head);
+	if (nt != NULL && nt->dp == dp)
+		return;
 	nt = malloc(sizeof(*nt), M_NAMEITRACKER, M_WAITOK);
 	vhold(dp);
 	nt->dp = dp;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202103041925.124JP18S087997>