From: Ming Lei <ming.lei@redhat.com>
To: Christoph Hellwig <hch@lst.de>
Cc: axboe@kernel.dk, linux-block@vger.kernel.org,
linux-scsi@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH 2/2] scsi_transport_fc: fix NULL pointer dereference in fc_bsg_job_timeout
Date: Fri, 8 Sep 2017 09:29:36 +0800 [thread overview]
Message-ID: <20170908012935.GC3802@ming.t460p> (raw)
In-Reply-To: <20170907115436.5069-3-hch@lst.de>
On Thu, Sep 07, 2017 at 01:54:36PM +0200, Christoph Hellwig wrote:
> 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
> ---
> drivers/scsi/scsi_transport_fc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c
> index 892fbd9800d9..bea06de60827 100644
> --- a/drivers/scsi/scsi_transport_fc.c
> +++ b/drivers/scsi/scsi_transport_fc.c
> @@ -3550,7 +3550,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);
> --
> 2.11.0
>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
--
Ming
next prev parent reply other threads:[~2017-09-08 1:29 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-07 11:54 two small bsg fixes, take 3 Christoph Hellwig
2017-09-07 11:54 ` [PATCH 1/2] bsg-lib: don't free job in bsg_prepare_job Christoph Hellwig
2017-09-08 1:28 ` Ming Lei
2017-09-15 4:31 ` Jens Axboe
2017-09-07 11:54 ` [PATCH 2/2] scsi_transport_fc: fix NULL pointer dereference in fc_bsg_job_timeout Christoph Hellwig
2017-09-08 1:29 ` Ming Lei [this message]
2017-09-15 0:40 ` Martin K. Petersen
2017-09-14 23:05 ` two small bsg fixes, take 3 Christoph Hellwig
-- strict thread matches above, loose matches on Subject: below --
2017-09-06 13:44 two small bsg fixes V2 Christoph Hellwig
2017-09-06 13:44 ` [PATCH 2/2] scsi_transport_fc: fix NULL pointer dereference in fc_bsg_job_timeout Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170908012935.GC3802@ming.t460p \
--to=ming.lei@redhat.com \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.