From nobody Fri May 31 22:36:19 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 4VrdJM5fmRz5LXyM; Fri, 31 May 2024 22:36:19 +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 4VrdJM58fnz4j9J; Fri, 31 May 2024 22:36:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717194979; 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=f/1HrI+lJxWzjN7oAGtmHMVRXXfFjc8SbCQgmNpZIPw=; b=k78lWzoxpV4tk6teD6wEtW44/rVhgkCuhuFMp8vYy6XBV0KnBmSLTFgkVye+DgTVBmWOTF xq1drXr+/ukEG7T7X/zN7l6AA7nHd1+4ifYixBgdUV9V7cvWwC0tisGpqRSAPdPwoPf4xU 4+64Ev4a0foRZZ5Qolr7NnKqd0t7Rxd2OLKTmyE2uLIM26m/Nk2liNux9Ys+KjGBBoZLSn KFsLtFMBbm1xwl5P1xOeZ+RFg49u864VakuzBUy90sId1TlD4FZNtEvKiis74RzfcL5P+1 1gULRY3Ivv0Y7j2BwfCmbdZXG+h7/fXIBT0jsi5GQVPKUCJRJVADxVYYIBGmjQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1717194979; a=rsa-sha256; cv=none; b=eH2OSN9Zknv3XAtYpNZFhLbSiSU2NX83V/FQ/u0vfor9qlM47Drkqu5FuGoPgXqT6hWX8W 50coen7y0z2yW3Igli4kl97AYa/qPr7CbKdzY1XP2DtQWJ96avnvgsT74jq7/KPGFuOvXR 92Sbks/kemirkKExVf8SamxIkQo6R0eyHzBIY/tpoewLp8fkwUdGYC/qwUkE6OjxJkMBXU WlrBcGgVtRh1oACKEZo1DS6MSERRXAQhxzFArwjhucY//tujdjdtXlAEJclznPl/QaRzXY k2z0l/4gceTqxADnlvFYslH0GVNc5srtF3881Gcngy4rYoyy+DYaoPK4gqXoMg== 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=1717194979; 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=f/1HrI+lJxWzjN7oAGtmHMVRXXfFjc8SbCQgmNpZIPw=; b=T1cgoz1FPGEDMZYdMmNZbz8afVBVcgR7zreJXJvpf6YhYboI8i+DBPwUzQeO94CRxl8mlq 6Fqfb4lHEb+zmiIKeClAXFPW/YJsxLBR7noM621FBBLCa3ejE9Uqy5XB9JYRJBsVjoaw5h GrRhAGDlFfYhhWVX7tta8pg6A7s9n8ctsRVr/iIglmR3NnJRG+80eTbqMV9P5Vmadu48aL vSX3Nuqtwllxz0hP8aj8YR/vw9ZdjUc8h7CTJv9e6BlPjua1ZPs0sHRYH+Y0uhuqnvVaKQ 4ws0FycTqOyxzgGkZvh3wGwYa9j3kryl4xnuWz/USWwTTx1SQ7DBWn21TBm8Tw== 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 4VrdJM4lmyzjDm; Fri, 31 May 2024 22:36:19 +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 44VMaJxP072621; Fri, 31 May 2024 22:36:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44VMaJRH072618; Fri, 31 May 2024 22:36:19 GMT (envelope-from git) Date: Fri, 31 May 2024 22:36:19 GMT Message-Id: <202405312236.44VMaJRH072618@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: 4c136aad80e6 - stable/14 - svc.c: Check for a non-NULL xp_socket 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: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 4c136aad80e6da1c9aa99de863642fe64a54f9a8 Auto-Submitted: auto-generated The branch stable/14 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=4c136aad80e6da1c9aa99de863642fe64a54f9a8 commit 4c136aad80e6da1c9aa99de863642fe64a54f9a8 Author: Rick Macklem AuthorDate: 2024-05-28 02:22:04 +0000 Commit: Rick Macklem CommitDate: 2024-05-31 22:35:18 +0000 svc.c: Check for a non-NULL xp_socket Commit a16ff32f04b5 added support to the kernel RPC to set TCP_USE_DDP. However, for the unusual case of a NFSv4.1/4.2 non-NULL callback, the xp_socket field of SVCXPRT is NULL, since it uses the same socket as the client->server connection. This patch adds the check for this to avoid crashes. This only affects NFSv4.1/4.2 mounts where either pNFS or delegations are in use. (cherry picked from commit 6c9170e0afc4ebec81ba88a6370ebf6cb55520ba) --- sys/rpc/svc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/rpc/svc.c b/sys/rpc/svc.c index 6d19a0b1ea7d..1e0e02c23cc1 100644 --- a/sys/rpc/svc.c +++ b/sys/rpc/svc.c @@ -1000,6 +1000,7 @@ svc_getreq(SVCXPRT *xprt, struct svc_req **rqstp_ret) * enable TLS offload first. */ if (xprt->xp_doneddp == 0 && r->rq_proc != NULLPROC && + xprt->xp_socket != NULL && atomic_cmpset_int(&xprt->xp_doneddp, 0, 1)) { if (xprt->xp_socket->so_proto->pr_protocol == IPPROTO_TCP) {