From nobody Fri Sep 02 01:56:05 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 4MJgxK63tvz4bQ2h; Fri, 2 Sep 2022 01:56:05 +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 4MJgxK5Ynvz3DRv; Fri, 2 Sep 2022 01:56:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1662083765; 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=9K2AVRd6IdobMMH9s49MAhscnvNqlGZbboGJRsQvQXo=; b=oiI0GJVbkqXGqkcgxKZ6Qt9/XtinalpdMnUaoXZA1zaHQJntY2AzxurR2pWM4zKQ0Ys+Wl nk1AHwkrIbA1tHo21fmlbYnYbjnxKeiTPGV2Xi5gwuKwHcfk2o463rcBi9/VV+b262N8T9 KA+XwfAwMvk03TEGoJLD70YgTWCLgKVAu37qeYpfAeatzmbqIxB5R2qbmEKwE7EKAknh0A M7/il30FHm4lwPjOKJAK2KZG4Igex9paVgwcG9eE7A+HPUkYCDodCTsZT41I5rQmL/DCbl 0BpEmB0+y9nEIQa8sJ5uMz8lee7eNC69b7jYd8pBvoYiOlEHblGN9ZqkbbNoWg== 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 4MJgxK4clKzgGX; Fri, 2 Sep 2022 01:56:05 +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 2821u5UV050719; Fri, 2 Sep 2022 01:56:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2821u5x7050718; Fri, 2 Sep 2022 01:56:05 GMT (envelope-from git) Date: Fri, 2 Sep 2022 01:56:05 GMT Message-Id: <202209020156.2821u5x7050718@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: a6f3979ad192 - stable/13 - nfscl: Fix handling of nd_slotid while handling NFSERR_BADSESSION 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/13 X-Git-Reftype: branch X-Git-Commit: a6f3979ad1923b7e742a6b4464917c9baea5b058 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1662083765; 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=9K2AVRd6IdobMMH9s49MAhscnvNqlGZbboGJRsQvQXo=; b=nlfSL5VeB+SIAu1ALw8unQG+Xvdi4wZbhfBx+0kEzLLmcVBociz5rZUnhTognDlIlwM0qb BwVzxn4F6xxI18io3uYQGZ+ahsLiYoQRWPdMSk6k6jh71Dv0vG6FsrBkqBejhIm98hRDqa kIztcJiArAGGEi/ryUh+Wkt+yhFovTA8PWf82UDAr10AKyUjcnjhcXBrqNDN9rypULEFGV DT0ZIs8UOvCfa0JMH1S4Wjz/EY+E830FKttBZAjG5FM4C7KK49C4/t2c+W34wTSMX4dEUL 8ixobmJ9AYLDNLXA0Mhq5ic0zoeNz7nAyVtPwk+mhQ/6G0ZNyBKyeOyMRtFktQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1662083765; a=rsa-sha256; cv=none; b=V0W0cfvHlKyG9XW5FQ/IylKlLV4HeRUYttv8k0tQyze+JqEurDbYKRksraudYx74Hf03ZO dZyYF2TafYBQlx8MdWozxNhstT5kMuJB7SUzpT6DAycI2rnTHhvQeAxOStR8GQZ6kRtsan iDpg2sr8ilEKTNrp2ojL0T/+RmS3o91/OwZWHRuWDUMpXovd2BzjKrLgotSxRJOivDZ3Wl +LHvt3nxUxkjk1dA+tY7g1VoID36Az8d42R1fy+UlyQ8K0y2Tyaxz6oIHTYV8D6k16BYwM 6N1t2YRXYksAwkgn68Y9vch8pyOGZrA2tvfSs1M1cxTEcaElzhq4PxDdPigNZQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=a6f3979ad1923b7e742a6b4464917c9baea5b058 commit a6f3979ad1923b7e742a6b4464917c9baea5b058 Author: Rick Macklem AuthorDate: 2022-08-27 23:03:18 +0000 Commit: Rick Macklem CommitDate: 2022-09-02 01:52:59 +0000 nfscl: Fix handling of nd_slotid while handling NFSERR_BADSESSION When the NFSv4.1/4.2 client is handling a server error of NFSERR_BADSESSION, it retries RPCs with a new session. Without this patch, the nd_slotid was not being updated for the new session. This would result in a bogus console message like "Wrong session srvslot=X slot=Y" and then it would free the incorrect slot, often generating a "freeing free slot!!" console message as well. This patch fixes the problem. Note that FreeBSD NFSv4.1/4.2 servers only generate a NFSERR_BADSESSION error after a reboot or after a client does a DestroySession operation. PR: 260011 (cherry picked from commit fb29f817586972444d65b1548287a51f27891639) --- sys/fs/nfs/nfs_commonkrpc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/fs/nfs/nfs_commonkrpc.c b/sys/fs/nfs/nfs_commonkrpc.c index 150d92414e7a..81df586879c5 100644 --- a/sys/fs/nfs/nfs_commonkrpc.c +++ b/sys/fs/nfs/nfs_commonkrpc.c @@ -1169,6 +1169,8 @@ tryagain: *tl++ = txdr_unsigned(slotseq); *tl++ = txdr_unsigned(slotpos); *tl = txdr_unsigned(maxslot); + nd->nd_slotid = slotpos; + nd->nd_flag |= ND_HASSLOTID; } if (reterr == NFSERR_BADSESSION || reterr == 0) {