linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike Christie <michaelc@cs.wisc.edu>
To: Christoph Hellwig <hch@lst.de>
Cc: James Bottomley <JBottomley@Parallels.com>, linux-scsi@vger.kernel.org
Subject: Re: [PATCH 3/4] scsi: reintroduce scsi_driver.init_command
Date: Mon, 31 Mar 2014 01:56:13 -0500	[thread overview]
Message-ID: <5339118D.4060406@cs.wisc.edu> (raw)
In-Reply-To: <1395936862-6938-4-git-send-email-hch@lst.de>

On 03/27/2014 11:14 AM, Christoph Hellwig wrote:
> @@ -1663,6 +1652,8 @@ static int sd_done(struct scsi_cmnd *SCpnt)
>  	unsigned char op = SCpnt->cmnd[0];
>  	unsigned char unmap = SCpnt->cmnd[1] & 8;
>  
> +	sd_uninit_command(SCpnt);
> +

The above call would free the cmnd->cmnd and set it to null. If then
scsi_io_completion was going to do some error processing it looks like
it could try to access the scsi_cmnd->cmnd field.

With the current code that would not be a problem because the blk unprep
callback is not called until the block layer does its request cleanup in
blk_finish_request which as you know is after
scsi_io_completion/scsi_end_request is done with the cmnd.

  parent reply	other threads:[~2014-03-31  6:56 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-27 16:14 misc scsi midlayer updates Christoph Hellwig
2014-03-27 16:14 ` [PATCH 1/4] scsi: explicitly release bidi buffers Christoph Hellwig
2014-03-31  5:58   ` Mike Christie
2014-03-31  6:10     ` Christoph Hellwig
2014-03-27 16:14 ` [PATCH 2/4] scsi: remove scsi_end_request Christoph Hellwig
2014-03-31  5:26   ` Nicholas A. Bellinger
2014-03-27 16:14 ` [PATCH 3/4] scsi: reintroduce scsi_driver.init_command Christoph Hellwig
2014-03-31  5:45   ` Nicholas A. Bellinger
2014-03-31  6:08     ` Christoph Hellwig
2014-03-31  6:20       ` Nicholas A. Bellinger
2014-03-31  6:56   ` Mike Christie [this message]
2014-03-31  8:09     ` Christoph Hellwig
2014-03-31 19:00   ` [PATCH 3/4 v2] " Christoph Hellwig
2014-03-27 16:14 ` [PATCH 4/4] scsi: handle command allocation failure in scsi_reset_provider Christoph Hellwig
2014-03-31  5:45   ` Nicholas A. Bellinger
2014-03-30 15:33 ` misc scsi midlayer updates Boaz Harrosh
2014-03-31  6:20   ` Christoph Hellwig
2014-03-31 21:55 ` Mike Christie
  -- strict thread matches above, loose matches on Subject: below --
2014-03-31 10:45 [PATCH 3/4] scsi: reintroduce scsi_driver.init_command Christoph Hellwig
2014-05-01 14:51 scsi midlayer updates for 3.15 (resend) Christoph Hellwig
2014-05-01 14:51 ` [PATCH 3/4] scsi: reintroduce scsi_driver.init_command Christoph Hellwig
2014-05-08  7:11   ` Hannes Reinecke

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=5339118D.4060406@cs.wisc.edu \
    --to=michaelc@cs.wisc.edu \
    --cc=JBottomley@Parallels.com \
    --cc=hch@lst.de \
    --cc=linux-scsi@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).