summaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2017-09-07 13:54:36 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2017-09-14 20:40:58 -0400
commitb468b6a4969f9bdddb31d484f151bfa03fbee767 (patch)
treedc072468b8d41f75c05ef24dea9adc9bf3490eca /drivers/scsi
parent3882a734c19b3cd7feb9e30e1dbd8ae54ac0905a (diff)
downloadlinux-b468b6a4969f9bdddb31d484f151bfa03fbee767.tar.bz2
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 <hch@lst.de> Cc: stable@vger.kernel.org Reviewed-by: Ming Lei <ming.lei@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/scsi_transport_fc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c
index 3c6bc0081fcb..ba9d70f8a6a1 100644
--- a/drivers/scsi/scsi_transport_fc.c
+++ b/drivers/scsi/scsi_transport_fc.c
@@ -3571,7 +3571,7 @@ fc_vport_sched_delete(struct work_struct *work)
static enum blk_eh_timer_return
fc_bsg_job_timeout(struct request *req)
{
- struct bsg_job *job = (void *) req->special;
+ struct bsg_job *job = blk_mq_rq_to_pdu(req);
struct Scsi_Host *shost = fc_bsg_to_shost(job);
struct fc_rport *rport = fc_bsg_to_rport(job);
struct fc_internal *i = to_fc_internal(shost->transportt);