From 59e749428111c029116a4302a544c7cc18b33772 Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Sun, 28 Feb 2021 02:12:43 +0200 Subject: [PATCH] Do not call nameicap_tracker_add() for dotdot case. Reviewed by: markj Tested by: arichardson, pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D28907 --- sys/kern/vfs_lookup.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index 4ddd7b63ce5c..73290e8da05f 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -1258,7 +1258,8 @@ success: } } if (ndp->ni_vp != NULL) { - nameicap_tracker_add(ndp, ndp->ni_vp); + if ((cnp->cn_flags & ISDOTDOT) == 0) + nameicap_tracker_add(ndp, ndp->ni_vp); if ((cnp->cn_flags & (FAILIFEXISTS | ISSYMLINK)) == FAILIFEXISTS) goto bad_eexist; }