Skip to content

Commit b468b6a

Browse files
Christoph Hellwigmartinkpetersen
authored andcommitted
scsi: scsi_transport_fc: fix NULL pointer dereference in fc_bsg_job_timeout
bsg-lib now embeddeds the job structure into the request, and req->special can't be used anymore. Signed-off-by: Christoph Hellwig <[email protected]> Cc: [email protected] Reviewed-by: Ming Lei <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 3882a73 commit b468b6a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/scsi/scsi_transport_fc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3571,7 +3571,7 @@ fc_vport_sched_delete(struct work_struct *work)
35713571
static enum blk_eh_timer_return
35723572
fc_bsg_job_timeout(struct request *req)
35733573
{
3574-
struct bsg_job *job = (void *) req->special;
3574+
struct bsg_job *job = blk_mq_rq_to_pdu(req);
35753575
struct Scsi_Host *shost = fc_bsg_to_shost(job);
35763576
struct fc_rport *rport = fc_bsg_to_rport(job);
35773577
struct fc_internal *i = to_fc_internal(shost->transportt);

0 commit comments

Comments
 (0)