Skip to content

Commit 5889798

Browse files
johnmeneghinismb49
authored andcommitted
scsi: qedf: Make qedf_execute_tmf() non-preemptible
BugLink: https://bugs.launchpad.net/bugs/2077600 [ 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 <[email protected]> Cc: Saurav Kashyap <[email protected]> Cc: Nilesh Javali <[email protected]> Signed-off-by: John Meneghini <[email protected]> Link: https://lore.kernel.org/r/[email protected] Acked-by: Saurav Kashyap <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]> Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Portia Stephens <[email protected]> Signed-off-by: Roxana Nicolescu <[email protected]>
1 parent 2fb4fb8 commit 5889798

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
@@ -2324,9 +2324,6 @@ static int qedf_execute_tmf(struct qedf_rport *fcport, u64 tm_lun,
23242324
io_req->fcport = fcport;
23252325
io_req->cmd_type = QEDF_TASK_MGMT_CMD;
23262326

2327-
/* Record which cpu this request is associated with */
2328-
io_req->cpu = smp_processor_id();
2329-
23302327
/* Set TM flags */
23312328
io_req->io_req_flags = QEDF_READ;
23322329
io_req->data_xfer_len = 0;
@@ -2349,6 +2346,9 @@ static int qedf_execute_tmf(struct qedf_rport *fcport, u64 tm_lun,
23492346

23502347
spin_lock_irqsave(&fcport->rport_lock, flags);
23512348

2349+
/* Record which cpu this request is associated with */
2350+
io_req->cpu = smp_processor_id();
2351+
23522352
sqe_idx = qedf_get_sqe_idx(fcport);
23532353
sqe = &fcport->sq[sqe_idx];
23542354
memset(sqe, 0, sizeof(struct fcoe_wqe));

0 commit comments

Comments
 (0)