]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.9-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 12 Sep 2022 14:43:30 +0000 (16:43 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 12 Sep 2022 14:43:30 +0000 (16:43 +0200)
added patches:
sunrpc-use-_bh-spinlocking-on-transport_lock.patch

queue-4.9/series
queue-4.9/sunrpc-use-_bh-spinlocking-on-transport_lock.patch [new file with mode: 0644]

index 6ce362011a7b029e86161f7625a8c5211b8b7183..43b9bc9ee5f645c92bd02745c93f0a0a48bf05cb 100644 (file)
@@ -39,3 +39,4 @@ tcp-fix-early-etimedout-after-spurious-non-sack-rto.patch
 sch_sfb-also-store-skb-len-before-calling-child-enqu.patch
 usb-dwc3-fix-phy-disable-sequence.patch
 mips-loongson32-ls1c-fix-hang-during-startup.patch
+sunrpc-use-_bh-spinlocking-on-transport_lock.patch
diff --git a/queue-4.9/sunrpc-use-_bh-spinlocking-on-transport_lock.patch b/queue-4.9/sunrpc-use-_bh-spinlocking-on-transport_lock.patch
new file mode 100644 (file)
index 0000000..5533b02
--- /dev/null
@@ -0,0 +1,44 @@
+From neilb@suse.de  Mon Sep 12 16:42:33 2022
+From: "NeilBrown" <neilb@suse.de>
+Date: Mon, 12 Sep 2022 09:00:52 +1000
+Subject: SUNRPC: use _bh spinlocking on ->transport_lock
+To: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
+Cc: "Eugeniu Rosca" <erosca@de.adit-jv.com>, "Trond Myklebust" <trondmy@hammerspace.com>, "mrodin@de.adit-jv.com" <mrodin@de.adit-jv.com>, "stable@vger.kernel.org" <stable@vger.kernel.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, "roscaeugeniu@gmail.com" <roscaeugeniu@gmail.com>
+Message-ID: <166293725263.30452.1720462103844620549@noble.neil.brown.name>
+
+From: "NeilBrown" <neilb@suse.de>
+
+Prior to Linux 5.3, ->transport_lock in sunrpc required the _bh style
+spinlocks (when not called from a bottom-half handler).
+
+When upstream 3848e96edf4788f772d83990022fa7023a233d83 was backported to
+stable kernels, the spin_lock/unlock calls should have been changed to
+the _bh version, but this wasn't noted in the patch and didn't happen.
+
+So convert these lock/unlock calls to the _bh versions.
+
+This patch is required for any stable kernel prior to 5.3 to which the
+above mentioned patch was backported.  Namely 4.9.y, 4.14.y, 4.19.y.
+
+Signed-off-by: NeilBrown <neilb@suse.de>
+Reported-by: Eugeniu Rosca <erosca@de.adit-jv.com>
+Reviewed-by: Eugeniu Rosca <erosca@de.adit-jv.com>
+Tested-by: Eugeniu Rosca <erosca@de.adit-jv.com>
+---
+ net/sunrpc/xprt.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/net/sunrpc/xprt.c
++++ b/net/sunrpc/xprt.c
+@@ -1451,9 +1451,9 @@ static void xprt_destroy(struct rpc_xprt
+        * is cleared.  We use ->transport_lock to ensure the mod_timer()
+        * can only run *before* del_time_sync(), never after.
+        */
+-      spin_lock(&xprt->transport_lock);
++      spin_lock_bh(&xprt->transport_lock);
+       del_timer_sync(&xprt->timer);
+-      spin_unlock(&xprt->transport_lock);
++      spin_unlock_bh(&xprt->transport_lock);
+       rpc_xprt_debugfs_unregister(xprt);
+       rpc_destroy_wait_queue(&xprt->binding);