Linux SCSI subsystem development
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Ani Sinha <ani@aristanetworks.com>
Cc: linux-scsi@vger.kernel.org,
	Francesco Ruggeri <fruggeri@aristanetworks.com>
Subject: Re: scsi_requeue_command and dropping reference to sdev_gendev
Date: Tue, 24 Jul 2012 09:09:15 +0400	[thread overview]
Message-ID: <1343106555.3513.1.camel@dabdike> (raw)
In-Reply-To: <CAOxq_8N=t0ramZXQ2O49MbQ2KC3k7D-3Uya93nTo3PY3HhF7Ww@mail.gmail.com>

On Mon, 2012-07-23 at 21:13 -0700, Ani Sinha wrote:
> Hi :
> 
> I am looking at the latest upstream code and I see a potential issue :
> 
> - scsi_requeue_command() drops reference to scsi_device->sdev_gendev in
> scsi_unprep_request->scsi_put_command()->__scsi_put_command(). This can
> trigger the cleanup routine scsi_device_dev_release_usercontext() that
> will deallocate the sdev->request_queue in blk_put_queue() call. This can
> cause potential problems in scsi_requeue_command() when it calls
> scsi_run_queue().
> 
> Am I missing something here?
> 
> Any suggestion will be greatly appreciated.

commit 940f5d47e2f2e1fa00443921a0abf4822335b54d
Author: Bart Van Assche <bvanassche@acm.org>
Date:   Fri Jun 29 15:34:26 2012 +0000

    [SCSI] Avoid dangling pointer in scsi_requeue_command()

James



  reply	other threads:[~2012-07-24  5:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-24  4:13 scsi_requeue_command and dropping reference to sdev_gendev Ani Sinha
2012-07-24  5:09 ` James Bottomley [this message]
2012-07-24 17:29   ` Ani Sinha

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=1343106555.3513.1.camel@dabdike \
    --to=james.bottomley@hansenpartnership.com \
    --cc=ani@aristanetworks.com \
    --cc=fruggeri@aristanetworks.com \
    --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