From nobody Wed May 15 13:22:01 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VfYm94wkvz5KsdV; Wed, 15 May 2024 13:22:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VfYm93v0Bz42TH; Wed, 15 May 2024 13:22:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715779321; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H1cMg/LToz2I5vn+UbnkDm31t8L9coau5wofO8ovLU4=; b=OSs+Y2SDeVJvUYHSiLlIEGChl1efnY6zDgP3vohb9pHgdXczZu0MekXvWnuWdv/XCBGTNw peqK7Hywp+6+MoM078yZ3ppSM8+G1NCNDAbIJc3HUyMliCgUJq/gyWaJgBIAquI682TV+3 1BtKOiB+mnmUI3RtHQ9aHkloJhhLbD88FEQ9AQs2xl0Vc93tKSZzi9vI9RcA1jdw0nb/4W 0o5FHTklVL9lsYl1KiR22cOH+jgUgyn1pm5bPcpinwOkmsRo4lJ1mYKkG9V8GZT9zBqBHw Xd7CK9bdLR9GeMm7/cDwfb2X/fe/fnfJUICpSFUMDRCEbJk/ucLjQvfaLlenLQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1715779321; a=rsa-sha256; cv=none; b=VQyR8PmWDte9w4noGxqeYtJM4wZWxPAnsZOSn+blct9I6WekE8Ies3xge971Hb5QjSkyJg FvtXHRkVOlAZeGeShFAO1WowSLPOOh7kcnsjmGofUmvDUozrt/FptVR4T6gtOkSA6cg2jY ExvYrHgXA5wqFhgKwG7w5SwAbQlwrHB0KhmSldncle9L2L8opPqAzz3q1lTt20hiCKexLM v0UrTgRVREzdyH0siy9bxfJM6k6mxNnSWdyMCTVzwop96SdXfUydj5/W9eFdM97UluY0TH IRns7hLSdA/9JHHrTnB2TmwfbquPiJ84VSinEMjy2/sIjntbfMvWSpHNyZnKlw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715779321; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H1cMg/LToz2I5vn+UbnkDm31t8L9coau5wofO8ovLU4=; b=qNnr+Z8nJbj4FWVTHXdFwbCSeXylNxUym8FJfRmkLgaaUu55TlDL5mBWcB8tmNT3rNBv8U 0MhIOyuBv+EtDPxTQfz1+Ni8uaXaKeFXz7PacHQKGH11NECF13W1+mZSbGmk5++6+dXy1u fauU5uttlRQQdzdH+f+HiI1FO5+SgAekVjI0ZjV7zdoO6EbogUTA/UF5rMIv3mgyyJRtla bdVz7HW2VE7iWh83nAkzN+CYkelSjIqlqJasxQinU3fMsBh3zDcgM/UNRbYANdfpT+nxtN TuHTzTNVnm0dKlRedMtdjYuDuOHcMGEpiT68EUX5TYOaLb6S9YlLyWX0hqNYew== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VfYm93VK7zH4s; Wed, 15 May 2024 13:22:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44FDM1Gt093856; Wed, 15 May 2024 13:22:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44FDM1xg093853; Wed, 15 May 2024 13:22:01 GMT (envelope-from git) Date: Wed, 15 May 2024 13:22:01 GMT Message-Id: <202405151322.44FDM1xg093853@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 00cf2f3092e4 - stable/14 - vfs_lookup.c: only call ktrcapfail() if KTRACE is enabled List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 00cf2f3092e462b8840b8cb9c3d86c471da065e5 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=00cf2f3092e462b8840b8cb9c3d86c471da065e5 commit 00cf2f3092e462b8840b8cb9c3d86c471da065e5 Author: Konstantin Belousov AuthorDate: 2024-04-24 19:06:14 +0000 Commit: Konstantin Belousov CommitDate: 2024-05-15 13:21:35 +0000 vfs_lookup.c: only call ktrcapfail() if KTRACE is enabled (cherry picked from commit 6b0cf2a2379b86b67269ed4549057cd6d69490e5) --- sys/kern/vfs_lookup.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index f7fb986d4472..b7f751a364ce 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -88,8 +88,14 @@ static void NDVALIDATE_impl(struct nameidata *, int); ndp->ni_cnd.cn_flags |= ISRESTARTED; \ } while (0) +#ifdef KTRACE +#define NIKTRCAPFAIL(path) ktrcapfail(CAPFAIL_NAMEI, (path)) +#else +#define NIKTRCAPFAIL(path) +#endif + #define NI_CAP_VIOLATION(ndp, path) do { \ - ktrcapfail(CAPFAIL_NAMEI, (path)); \ + NIKTRCAPFAIL(path); \ (ndp)->ni_lcf &= ~NI_LCF_KTR_FLAGS; \ } while (0)