Patch "SUNRPC: use _bh spinlocking on ->transport_lock" has been added to the 4.9-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    SUNRPC: use _bh spinlocking on ->transport_lock

to the 4.9-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     sunrpc-use-_bh-spinlocking-on-transport_lock.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From neilb@xxxxxxx  Mon Sep 12 16:42:33 2022
From: "NeilBrown" <neilb@xxxxxxx>
Date: Mon, 12 Sep 2022 09:00:52 +1000
Subject: SUNRPC: use _bh spinlocking on ->transport_lock
To: "gregkh@xxxxxxxxxxxxxxxxxxx" <gregkh@xxxxxxxxxxxxxxxxxxx>
Cc: "Eugeniu Rosca" <erosca@xxxxxxxxxxxxxx>, "Trond Myklebust" <trondmy@xxxxxxxxxxxxxxx>, "mrodin@xxxxxxxxxxxxxx" <mrodin@xxxxxxxxxxxxxx>, "stable@xxxxxxxxxxxxxxx" <stable@xxxxxxxxxxxxxxx>, "linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>, "roscaeugeniu@xxxxxxxxx" <roscaeugeniu@xxxxxxxxx>
Message-ID: <166293725263.30452.1720462103844620549@xxxxxxxxxxxxxxxxxxxxx>

From: "NeilBrown" <neilb@xxxxxxx>

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@xxxxxxx>
Reported-by: Eugeniu Rosca <erosca@xxxxxxxxxxxxxx>
Reviewed-by: Eugeniu Rosca <erosca@xxxxxxxxxxxxxx>
Tested-by: Eugeniu Rosca <erosca@xxxxxxxxxxxxxx>
---
 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);


Patches currently in stable-queue which might be from neilb@xxxxxxx are

queue-4.9/sunrpc-use-_bh-spinlocking-on-transport_lock.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux