]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 16 Oct 2025 13:24:55 +0000 (15:24 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 16 Oct 2025 13:24:55 +0000 (15:24 +0200)
added patches:
nfsd-nfserr_jukebox-in-nlm_fopen-should-lead-to-a-retry.patch

queue-5.4/nfsd-nfserr_jukebox-in-nlm_fopen-should-lead-to-a-retry.patch [new file with mode: 0644]
queue-5.4/series

diff --git a/queue-5.4/nfsd-nfserr_jukebox-in-nlm_fopen-should-lead-to-a-retry.patch b/queue-5.4/nfsd-nfserr_jukebox-in-nlm_fopen-should-lead-to-a-retry.patch
new file mode 100644 (file)
index 0000000..1d49ee5
--- /dev/null
@@ -0,0 +1,50 @@
+From a082e4b4d08a4a0e656d90c2c05da85f23e6d0c9 Mon Sep 17 00:00:00 2001
+From: Olga Kornievskaia <okorniev@redhat.com>
+Date: Thu, 21 Aug 2025 16:31:46 -0400
+Subject: nfsd: nfserr_jukebox in nlm_fopen should lead to a retry
+
+From: Olga Kornievskaia <okorniev@redhat.com>
+
+commit a082e4b4d08a4a0e656d90c2c05da85f23e6d0c9 upstream.
+
+When v3 NLM request finds a conflicting delegation, it triggers
+a delegation recall and nfsd_open fails with EAGAIN. nfsd_open
+then translates EAGAIN into nfserr_jukebox. In nlm_fopen, instead
+of returning nlm_failed for when there is a conflicting delegation,
+drop this NLM request so that the client retries. Once delegation
+is recalled and if a local lock is claimed, a retry would lead to
+nfsd returning a nlm_lck_blocked error or a successful nlm lock.
+
+Fixes: d343fce148a4 ("[PATCH] knfsd: Allow lockd to drop replies as appropriate")
+Cc: stable@vger.kernel.org # v6.6
+Signed-off-by: Olga Kornievskaia <okorniev@redhat.com>
+Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ fs/nfsd/lockd.c |   15 +++++++++++++++
+ 1 file changed, 15 insertions(+)
+
+--- a/fs/nfsd/lockd.c
++++ b/fs/nfsd/lockd.c
+@@ -44,6 +44,21 @@ nlm_fopen(struct svc_rqst *rqstp, struct
+       switch (nfserr) {
+       case nfs_ok:
+               return 0;
++      case nfserr_jukebox:
++              /* this error can indicate a presence of a conflicting
++               * delegation to an NLM lock request. Options are:
++               * (1) For now, drop this request and make the client
++               * retry. When delegation is returned, client's lock retry
++               * will complete.
++               * (2) NLM4_DENIED as per "spec" signals to the client
++               * that the lock is unavailable now but client can retry.
++               * Linux client implementation does not. It treats
++               * NLM4_DENIED same as NLM4_FAILED and errors the request.
++               * (3) For the future, treat this as blocked lock and try
++               * to callback when the delegation is returned but might
++               * not have a proper lock request to block on.
++               */
++              fallthrough;
+       case nfserr_dropit:
+               return nlm_drop_reply;
+       case nfserr_stale:
index 7514d13486b91b1bc007ad7e5ec1d78661a5e72d..d97e445b7c5293fef39fdf6c9813027b42acbfb4 100644 (file)
@@ -126,3 +126,4 @@ pci-aer-fix-missing-uevent-on-recovery-when-a-reset-is-requested.patch
 pci-keystone-use-devm_request_irq-to-free-ks-pcie-error-irq-on-exit.patch
 x86-umip-check-that-the-instruction-opcode-is-at-least-two-bytes.patch
 x86-umip-fix-decoding-of-register-forms-of-0f-01-sgdt-and-sidt-aliases.patch
+nfsd-nfserr_jukebox-in-nlm_fopen-should-lead-to-a-retry.patch