Skip to content

Commit

Permalink
scsi: scsi_transport_fc: fix NULL pointer dereference in fc_bsg_job_t…
Browse files Browse the repository at this point in the history
…imeout

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>
  • Loading branch information
Christoph Hellwig authored and Martin K. Petersen committed Sep 15, 2017
1 parent 3882a73 commit b468b6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/scsi/scsi_transport_fc.c
Original file line number Diff line number Diff line change
@@ -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);

0 comments on commit b468b6a

Please sign in to comment.