From nobody Sat Oct 08 23:25:40 2022 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 4MlLrh4B7tz4fJbs; Sat, 8 Oct 2022 23:25:40 +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 4MlLrh3C0Tz3Xs0; Sat, 8 Oct 2022 23:25:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665271540; 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=8wYb4oL4O6ll7DN18imK/MEROe4sED/MiCfv8bS9+y8=; b=Qz80ggPUMNvBvVMHz5qKv5H8GAGvbwR2cf2xRQOLeyfqgpIwvkvY68P5QWfgs0AZKpPjYq X9D/aELBubqaa55KKJro9pqdnPcmz0DVF7glYnV7d3GkG/WxLsFI3NX1ADT4+6FEMeZN0V XnTRVxDjwJZjuTsjnmV1eIVFN0e7QkmNHHEKd3cjiGpbgtmqric4vTVhA0AOX1G153hzuN WOaWAXRsl+GTYwGYVGg/V28MNuvXq0Gx8ry7C5fjHryD7cGcdK/MXAcAneQkOyT69Ln1Ce 2j/68yT6+cadUJWNcLXFSbydfcfOF49VI/RmOBux8LqdD45yXWHHG2Fk76xHrQ== 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 4MlLrh23PPz15YD; Sat, 8 Oct 2022 23:25:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 298NPe6k033885; Sat, 8 Oct 2022 23:25:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 298NPe5S033884; Sat, 8 Oct 2022 23:25:40 GMT (envelope-from git) Date: Sat, 8 Oct 2022 23:25:40 GMT Message-Id: <202210082325.298NPe5S033884@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: 690222c3f120 - stable/12 - nfs_clvnops.c: Fix access to v_mount when vnode unlocked 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 690222c3f1200cf4e98c4ba3053f1d10eafc22a2 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665271540; 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=8wYb4oL4O6ll7DN18imK/MEROe4sED/MiCfv8bS9+y8=; b=WBxa9Ao+5ufwZ2ENefXLweCgOI2KIIM2ga9my6DSUZuKHNbV5YPl8ZJe/oj+HONLFlLwf9 YlTKC6JZzxoiJPAvSQGsBkPWvZ1HnFTziE2IroYNNgWKkaPSLOGJlBDcQxX41hx3kpLDsZ advtgS/xUDsTaAfC6/LUAOeGGqhBpWNcWyG1QCkd4D4BzblNQX2hOq919I5cqbTihLc+4v g1NBqiAFgLEofA/a14GdI2kStCpHG9eTUBirU1rAia5SPbWd+0lZEYm5NFU0c1+gLS5FBO 5Bbg8KyNNy7gBiQMR/MPKAsgQ/2VNxvrHu4JuSEYHPBSgGZEHcKvg45N97vtlQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1665271540; a=rsa-sha256; cv=none; b=DUVanh8XE2eGWUjARX14YMxCZzfFRZvMAN5WIl1aPm4IDNEpl4LtkPy/U4YcpeTgxiIx5l a1c8XeS0VV1pNICRG9oyWczdz3hMJWnW/7LbPrp+L+dXKRFRj/KDYuYA4t1/QyN1EcP+hK IFAz1zBBFQ2Q736ING6weS3oiuYxmGB8saftoyIt8+NIXlOuOH+8dU70Ou5ciHy2WKJML5 PQpmMeMXFfqUNt12DWEsOf1VPQDwfatwDbL+sId9W3Uhd5sZsO6WRVIODWBpPBFoNlKFrS EP/XE4piVFJZBz3Ae6SewGjnmeB/ks70kEiL9ETUoX8Nj2gmJeKQwrLLC8Weqw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=690222c3f1200cf4e98c4ba3053f1d10eafc22a2 commit 690222c3f1200cf4e98c4ba3053f1d10eafc22a2 Author: Rick Macklem AuthorDate: 2022-10-01 23:30:07 +0000 Commit: Rick Macklem CommitDate: 2022-10-08 23:24:50 +0000 nfs_clvnops.c: Fix access to v_mount when vnode unlocked Commit ab17854f974b fixed access to v_mount when the vnode is unlocked for nfs_copy_file_range(). This patch does the same for nfs_advlockasync(). (cherry picked from commit a82308abab86740e9bc37499bd2a13568764d7a0) --- sys/fs/nfsclient/nfs_clvnops.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/fs/nfsclient/nfs_clvnops.c b/sys/fs/nfsclient/nfs_clvnops.c index 64386afccb4c..24c53de7309c 100644 --- a/sys/fs/nfsclient/nfs_clvnops.c +++ b/sys/fs/nfsclient/nfs_clvnops.c @@ -3320,11 +3320,13 @@ nfs_advlockasync(struct vop_advlockasync_args *ap) u_quad_t size; int error; - if (NFS_ISV4(vp)) - return (EOPNOTSUPP); error = NFSVOPLOCK(vp, LK_SHARED); if (error) return (error); + if (NFS_ISV4(vp)) { + NFSVOPUNLOCK(vp, 0); + return (EOPNOTSUPP); + } if ((VFSTONFS(vp->v_mount)->nm_flag & NFSMNT_NOLOCKD) != 0) { size = VTONFS(vp)->n_size; NFSVOPUNLOCK(vp, 0);