Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

scsi: qedf: Make qedf_execute_tmf() non-preemptible

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>

authored by

John Meneghini and committed by
Martin K. Petersen
0d8b637c 504e2bed

+3 -3
+3 -3
drivers/scsi/qedf/qedf_io.c
··· 2324 2324 io_req->fcport = fcport; 2325 2325 io_req->cmd_type = QEDF_TASK_MGMT_CMD; 2326 2326 2327 - /* Record which cpu this request is associated with */ 2328 - io_req->cpu = smp_processor_id(); 2329 - 2330 2327 /* Set TM flags */ 2331 2328 io_req->io_req_flags = QEDF_READ; 2332 2329 io_req->data_xfer_len = 0; ··· 2345 2348 init_completion(&io_req->tm_done); 2346 2349 2347 2350 spin_lock_irqsave(&fcport->rport_lock, flags); 2351 + 2352 + /* Record which cpu this request is associated with */ 2353 + io_req->cpu = smp_processor_id(); 2348 2354 2349 2355 sqe_idx = qedf_get_sqe_idx(fcport); 2350 2356 sqe = &fcport->sq[sqe_idx];