Skip to content

Commit 7abe14b

Browse files
committed
scsi: qedf: Make qedf_execute_tmf() non-preemptible
jira LE-3201 cve CVE-2024-42124 Rebuild_History Non-Buildable kernel-rt-4.18.0-553.22.1.rt7.363.el8_10 commit-author John Meneghini <jmeneghi@redhat.com> commit 0d8b637 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@redhat.com> Cc: Saurav Kashyap <skashyap@marvell.com> Cc: Nilesh Javali <njavali@marvell.com> Signed-off-by: John Meneghini <jmeneghi@redhat.com> Link: https://lore.kernel.org/r/20240403150155.412954-1-jmeneghi@redhat.com Acked-by: Saurav Kashyap <skashyap@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> (cherry picked from commit 0d8b637) Signed-off-by: Jonathan Maple <jmaple@ciq.com>
1 parent 7c58446 commit 7abe14b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/scsi/qedf/qedf_io.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2344,9 +2344,6 @@ static int qedf_execute_tmf(struct qedf_rport *fcport, struct scsi_cmnd *sc_cmd,
23442344
io_req->fcport = fcport;
23452345
io_req->cmd_type = QEDF_TASK_MGMT_CMD;
23462346

2347-
/* Record which cpu this request is associated with */
2348-
io_req->cpu = smp_processor_id();
2349-
23502347
/* Set TM flags */
23512348
io_req->io_req_flags = QEDF_READ;
23522349
io_req->data_xfer_len = 0;
@@ -2368,6 +2365,9 @@ static int qedf_execute_tmf(struct qedf_rport *fcport, struct scsi_cmnd *sc_cmd,
23682365

23692366
spin_lock_irqsave(&fcport->rport_lock, flags);
23702367

2368+
/* Record which cpu this request is associated with */
2369+
io_req->cpu = smp_processor_id();
2370+
23712371
sqe_idx = qedf_get_sqe_idx(fcport);
23722372
sqe = &fcport->sq[sqe_idx];
23732373
memset(sqe, 0, sizeof(struct fcoe_wqe));

0 commit comments

Comments
 (0)