From nobody Fri Apr 07 19:58:36 2023 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 4PtThD72mVz446FD; Fri, 7 Apr 2023 19:58:36 +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 4PtThD6YyXz3qxF; Fri, 7 Apr 2023 19:58:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1680897516; 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=YpEK5D48jKhCSaCoytBmZRNRxQWO2/Jo8KfDycVaHQk=; b=ZEYeGmom0lOfSmJ8xKB7L9Bhrqai8qO9dWtNtrEIsDSLuGu71M71VwIfgrbazG5mu7Y38U L2hkPcjANZzHmp+W4wDmvinJEEd1fSYu+Hso0grONzY/gRdULSBmLgQYhgOdxpihrSjWQN clMZmo89XJClSDkNXKmSsNDZmP9xS2DX7Yo0Vw92TpGInSmO7Nc++KbCVZpni/O2a6S3VU wDzKbGdN7+f0YKFghFlElOh6eniixMEesglP1ONxWVI6VCQxoqZOiM9qySsCFHNllUymYp 3LU+nQYOSQgwKCymjhALYkZcOeNW8GuiwA/OCOdG4skIb5WYfxYHjvvaxz6fSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1680897516; 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=YpEK5D48jKhCSaCoytBmZRNRxQWO2/Jo8KfDycVaHQk=; b=dSKBgMKkL/LdNnMmQ1xIW763Uc3lRExPwessPmhI0TYv3U2CE1e81b7cT7w8Yg9ZqpsW8O otlUnnTGqM9wWbsW/Qu1IAsY1UTFghVCQS3ezf9+wO3NK0lc+SZHqCu+WxwBdHvPI2Pbjh UQIgjJwUZ6hgohntkM/4zUN/aTApmRUqjLHk08rTNtzci8TlQklyynIWz3RHk2qDD39hLm G289PyALQ0bdC3P/2S0Bb7XPG/xCfnXld/f7nNWuy9pZvlHfq6UjySvBRUa08+io69j/0h Zxh2Dgu4fdAjkif2ahkNw+MtVktS9HCGOrrB0YMQi+H2cJSJq58xJZx8VVSOsA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1680897516; a=rsa-sha256; cv=none; b=gy2wP4kxXr+3DVlp3ZaVajrSiXJe0s1z4c/cEQeQ0El2vJpeqWLnG8MJ9v3pbtdJr4DLr+ rNrVdG+CXgdIdjIcyXolGHjsU+j3VkkDNKJfO2Etfz/MeAhQRG3aAw6RuAt/MBp4FhfOrk nC8V1w4ATpGH23vZ8wZAnUnS60RIe0gXuNXn2gq5dgsXeAFveiEBJ8uW9yBxhI+dV0G0eO kjXikG6SSL+J4f7Qb/croMEz7KkaQQA8zT89IUpukWRWrsSJx++00EyReBvbIcvUw7OoJI 0T7qcJpszToCBUX/wa8YSspt9bA2yyjGbAuYR7Xq/yNj/KPnV7dkFuRVaGYjRQ== 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 4PtThD5gkJzyHN; Fri, 7 Apr 2023 19:58:36 +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 337JwaQO063598; Fri, 7 Apr 2023 19:58:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 337JwaTw063597; Fri, 7 Apr 2023 19:58:36 GMT (envelope-from git) Date: Fri, 7 Apr 2023 19:58:36 GMT Message-Id: <202304071958.337JwaTw063597@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: 4adb28c0abfa - main - nfscl: Fix support for doing Null RPCs 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/main X-Git-Reftype: branch X-Git-Commit: 4adb28c0abfa3b8d076c7249f61a093c6eb9dac2 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=4adb28c0abfa3b8d076c7249f61a093c6eb9dac2 commit 4adb28c0abfa3b8d076c7249f61a093c6eb9dac2 Author: Rick Macklem AuthorDate: 2023-04-07 19:57:26 +0000 Commit: Rick Macklem CommitDate: 2023-04-07 19:57:26 +0000 nfscl: Fix support for doing Null RPCs Although the NFS client does not currently perform Null RPCs, this fix is needed if/when it might do so. Found during testing of experimental code that uses Null RPCs to maintain/monitor TCP connections for "nconnect" mounts. MFC after: 3 months --- sys/fs/nfs/nfs_commonsubs.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/fs/nfs/nfs_commonsubs.c b/sys/fs/nfs/nfs_commonsubs.c index 81bd2beba749..cb12f5a59a6e 100644 --- a/sys/fs/nfs/nfs_commonsubs.c +++ b/sys/fs/nfs/nfs_commonsubs.c @@ -375,6 +375,10 @@ nfscl_reqstart(struct nfsrv_descript *nd, int procnum, struct nfsmount *nmp, nd->nd_mreq = nd->nd_mb = mb; nd->nd_bpos = mtod(mb, char *); + /* For NFSPROC_NULL, there are no arguments. */ + if (procnum == NFSPROC_NULL) + goto out; + /* * And fill the first file handle into the request. */ @@ -470,6 +474,7 @@ nfscl_reqstart(struct nfsrv_descript *nd, int procnum, struct nfsmount *nmp, } else { (void)nfsm_fhtom(NULL, nd, nfhp, fhlen, 0); } +out: if (procnum < NFSV42_NPROCS) NFSINCRGLOBAL(nfsstatsv1.rpccnt[procnum]); }