Patch "scsi: qedf: Make qedf_execute_tmf() non-preemptible" has been added to the 6.1-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

    scsi: qedf: Make qedf_execute_tmf() non-preemptible

to the 6.1-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:
     scsi-qedf-make-qedf_execute_tmf-non-preemptible.patch
and it can be found in the queue-6.1 subdirectory.

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



commit f8bf6421e9cf36f2ff75f862bbf150e4251a4609
Author: John Meneghini <jmeneghi@xxxxxxxxxx>
Date:   Wed Apr 3 11:01:55 2024 -0400

    scsi: qedf: Make qedf_execute_tmf() non-preemptible
    
    [ Upstream commit 0d8b637c9c5eeaa1a4e3dfb336f3ff918eb64fec ]
    
    Stop calling smp_processor_id() from preemptible code in
    qedf_execute_tmf90.  This results in BUG_ON() when running an RT kernel.
    
    [ 659.343280] BUG: using smp_processor_id() in preemptible [00000000] code: sg_reset/3646
    [ 659.343282] caller is qedf_execute_tmf+0x8b/0x360 [qedf]
    
    Tested-by: Guangwu Zhang <guazhang@xxxxxxxxxx>
    Cc: Saurav Kashyap <skashyap@xxxxxxxxxxx>
    Cc: Nilesh Javali <njavali@xxxxxxxxxxx>
    Signed-off-by: John Meneghini <jmeneghi@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20240403150155.412954-1-jmeneghi@xxxxxxxxxx
    Acked-by: Saurav Kashyap <skashyap@xxxxxxxxxxx>
    Signed-off-by: Martin K. Petersen <martin.petersen@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/scsi/qedf/qedf_io.c b/drivers/scsi/qedf/qedf_io.c
index 10fe3383855c0..031e605b3f427 100644
--- a/drivers/scsi/qedf/qedf_io.c
+++ b/drivers/scsi/qedf/qedf_io.c
@@ -2331,9 +2331,6 @@ static int qedf_execute_tmf(struct qedf_rport *fcport, struct scsi_cmnd *sc_cmd,
 	io_req->fcport = fcport;
 	io_req->cmd_type = QEDF_TASK_MGMT_CMD;
 
-	/* Record which cpu this request is associated with */
-	io_req->cpu = smp_processor_id();
-
 	/* Set TM flags */
 	io_req->io_req_flags = QEDF_READ;
 	io_req->data_xfer_len = 0;
@@ -2355,6 +2352,9 @@ static int qedf_execute_tmf(struct qedf_rport *fcport, struct scsi_cmnd *sc_cmd,
 
 	spin_lock_irqsave(&fcport->rport_lock, flags);
 
+	/* Record which cpu this request is associated with */
+	io_req->cpu = smp_processor_id();
+
 	sqe_idx = qedf_get_sqe_idx(fcport);
 	sqe = &fcport->sq[sqe_idx];
 	memset(sqe, 0, sizeof(struct fcoe_wqe));




[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