Patch "RDMA/rtrs-srv: Do not unconditionally enable irq" has been added to the 6.6-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

    RDMA/rtrs-srv: Do not unconditionally enable irq

to the 6.6-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:
     rdma-rtrs-srv-do-not-unconditionally-enable-irq.patch
and it can be found in the queue-6.6 subdirectory.

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



commit b5376a2cfec57a0c9a53732bca7e9b10c261ef8f
Author: Jack Wang <jinpu.wang@xxxxxxxxx>
Date:   Mon Nov 20 16:41:38 2023 +0100

    RDMA/rtrs-srv: Do not unconditionally enable irq
    
    [ Upstream commit 3ee7ecd712048ade6482bea4b2f3dcaf039c0348 ]
    
    When IO is completed, rtrs can be called in softirq context,
    unconditionally enabling irq could cause panic.
    
    To be on safe side, use spin_lock_irqsave and spin_unlock_irqrestore
    instread.
    
    Fixes: 9cb837480424 ("RDMA/rtrs: server: main functionality")
    Signed-off-by: Jack Wang <jinpu.wang@xxxxxxxxx>
    Signed-off-by: Florian-Ewald Mueller <florian-ewald.mueller@xxxxxxxxx>
    Signed-off-by: Md Haris Iqbal <haris.iqbal@xxxxxxxxx>
    Signed-off-by: Grzegorz Prajsner <grzegorz.prajsner@xxxxxxxxx>
    Link: https://lore.kernel.org/r/20231120154146.920486-2-haris.iqbal@xxxxxxxxx
    Signed-off-by: Leon Romanovsky <leon@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/infiniband/ulp/rtrs/rtrs-srv.c b/drivers/infiniband/ulp/rtrs/rtrs-srv.c
index 75e56604e4628..ab4200041fd36 100644
--- a/drivers/infiniband/ulp/rtrs/rtrs-srv.c
+++ b/drivers/infiniband/ulp/rtrs/rtrs-srv.c
@@ -65,8 +65,9 @@ static bool rtrs_srv_change_state(struct rtrs_srv_path *srv_path,
 {
 	enum rtrs_srv_state old_state;
 	bool changed = false;
+	unsigned long flags;
 
-	spin_lock_irq(&srv_path->state_lock);
+	spin_lock_irqsave(&srv_path->state_lock, flags);
 	old_state = srv_path->state;
 	switch (new_state) {
 	case RTRS_SRV_CONNECTED:
@@ -87,7 +88,7 @@ static bool rtrs_srv_change_state(struct rtrs_srv_path *srv_path,
 	}
 	if (changed)
 		srv_path->state = new_state;
-	spin_unlock_irq(&srv_path->state_lock);
+	spin_unlock_irqrestore(&srv_path->state_lock, flags);
 
 	return changed;
 }




[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