From: Greg Kroah-Hartman Date: Sat, 26 Aug 2023 17:48:38 +0000 (+0200) Subject: 4.19-stable patches X-Git-Tag: v6.1.49~61 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=171f7563c7a222d1ade15fd61dcc475487550c16;p=thirdparty%2Fkernel%2Fstable-queue.git 4.19-stable patches added patches: ibmveth-use-dcbf-rather-than-dcbfl.patch nfsv4-fix-dropped-lock-for-racing-open-and-delegation-return.patch --- diff --git a/queue-4.19/ibmveth-use-dcbf-rather-than-dcbfl.patch b/queue-4.19/ibmveth-use-dcbf-rather-than-dcbfl.patch new file mode 100644 index 00000000000..bcdec8e3af6 --- /dev/null +++ b/queue-4.19/ibmveth-use-dcbf-rather-than-dcbfl.patch @@ -0,0 +1,34 @@ +From bfedba3b2c7793ce127680bc8f70711e05ec7a17 Mon Sep 17 00:00:00 2001 +From: Michael Ellerman +Date: Wed, 23 Aug 2023 14:51:39 +1000 +Subject: ibmveth: Use dcbf rather than dcbfl + +From: Michael Ellerman + +commit bfedba3b2c7793ce127680bc8f70711e05ec7a17 upstream. + +When building for power4, newer binutils don't recognise the "dcbfl" +extended mnemonic. + +dcbfl RA, RB is equivalent to dcbf RA, RB, 1. + +Switch to "dcbf" to avoid the build error. + +Signed-off-by: Michael Ellerman +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman +--- + drivers/net/ethernet/ibm/ibmveth.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/net/ethernet/ibm/ibmveth.c ++++ b/drivers/net/ethernet/ibm/ibmveth.c +@@ -209,7 +209,7 @@ static inline void ibmveth_flush_buffer( + unsigned long offset; + + for (offset = 0; offset < length; offset += SMP_CACHE_BYTES) +- asm("dcbfl %0,%1" :: "b" (addr), "r" (offset)); ++ asm("dcbf %0,%1,1" :: "b" (addr), "r" (offset)); + } + + /* replenish the buffers for a pool. note that we don't need to diff --git a/queue-4.19/nfsv4-fix-dropped-lock-for-racing-open-and-delegation-return.patch b/queue-4.19/nfsv4-fix-dropped-lock-for-racing-open-and-delegation-return.patch new file mode 100644 index 00000000000..d60de6ff916 --- /dev/null +++ b/queue-4.19/nfsv4-fix-dropped-lock-for-racing-open-and-delegation-return.patch @@ -0,0 +1,54 @@ +From 1cbc11aaa01f80577b67ae02c73ee781112125fd Mon Sep 17 00:00:00 2001 +From: Benjamin Coddington +Date: Fri, 30 Jun 2023 09:18:13 -0400 +Subject: NFSv4: Fix dropped lock for racing OPEN and delegation return + +From: Benjamin Coddington + +commit 1cbc11aaa01f80577b67ae02c73ee781112125fd upstream. + +Commmit f5ea16137a3f ("NFSv4: Retry LOCK on OLD_STATEID during delegation +return") attempted to solve this problem by using nfs4's generic async error +handling, but introduced a regression where v4.0 lock recovery would hang. +The additional complexity introduced by overloading that error handling is +not necessary for this case. This patch expects that commit to be +reverted. + +The problem as originally explained in the above commit is: + + There's a small window where a LOCK sent during a delegation return can + race with another OPEN on client, but the open stateid has not yet been + updated. In this case, the client doesn't handle the OLD_STATEID error + from the server and will lose this lock, emitting: + "NFS: nfs4_handle_delegation_recall_error: unhandled error -10024". + +Fix this by using the old_stateid refresh helpers if the server replies +with OLD_STATEID. + +Suggested-by: Trond Myklebust +Signed-off-by: Benjamin Coddington +Signed-off-by: Trond Myklebust +Signed-off-by: Greg Kroah-Hartman +--- + fs/nfs/nfs4proc.c | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +--- a/fs/nfs/nfs4proc.c ++++ b/fs/nfs/nfs4proc.c +@@ -6644,8 +6644,15 @@ static void nfs4_lock_done(struct rpc_ta + } else if (!nfs4_update_lock_stateid(lsp, &data->res.stateid)) + goto out_restart; + break; +- case -NFS4ERR_BAD_STATEID: + case -NFS4ERR_OLD_STATEID: ++ if (data->arg.new_lock_owner != 0 && ++ nfs4_refresh_open_old_stateid(&data->arg.open_stateid, ++ lsp->ls_state)) ++ goto out_restart; ++ if (nfs4_refresh_lock_old_stateid(&data->arg.lock_stateid, lsp)) ++ goto out_restart; ++ fallthrough; ++ case -NFS4ERR_BAD_STATEID: + case -NFS4ERR_STALE_STATEID: + case -NFS4ERR_EXPIRED: + if (data->arg.new_lock_owner != 0) { diff --git a/queue-4.19/series b/queue-4.19/series index 4153df30cfc..e2e1ed3a96b 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -118,3 +118,5 @@ net-remove-bond_slave_has_mac_rcu.patch bonding-fix-macvlan-over-alb-bond-support.patch ipvs-improve-robustness-to-the-ipvs-sysctl.patch ipvs-fix-racy-memcpy-in-proc_do_sync_threshold.patch +ibmveth-use-dcbf-rather-than-dcbfl.patch +nfsv4-fix-dropped-lock-for-racing-open-and-delegation-return.patch