public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <bart.vanassche@gmail.com>
To: Roland Dreier <rdreier@cisco.com>
Cc: Sean Hefty <sean.hefty@intel.com>,
	Hal Rosenstock <hal.rosenstock@gmail.com>,
	OpenIB <general@lists.openfabrics.org>,
	Vladislav Bolkhovitin <vst@vlnb.net>,
	linux-scsi <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH 2.6.30.4] Fix for NULL pointer dereference by SRP initiator triggered by a SCSI reset after the SRP connection has been closed
Date: Wed, 5 Aug 2009 19:48:47 +0200	[thread overview]
Message-ID: <e2e108260908051048l41939aesd8b4769aae22f4b@mail.gmail.com> (raw)
In-Reply-To: <adaiqh2jgug.fsf@cisco.com>

On Wed, Aug 5, 2009 at 7:44 PM, Roland Dreier<rdreier@cisco.com> wrote:
>
>  > The NULL pointer dereference happens when srp_reset_device() calls
>  > srp_send_tsk_mgmt(target, req, SRP_TSK_LUN_RESET) with
>  > req->scmnd->device == NULL. When the sg_reset command issues an
>  > SG_SCSI_RESET ioctl, scsi_reset_provider() is invoked and allocates an
>  > scmnd structure and sets scmnd->device to NULL. It is this scmnd
>  > structure that is passed to srp_reset_device(). What I'm not sure
>  > about is whether scsi_reset_provider() should set req->scmnd->device
>  > to a non-NULL value or whether srp_send_tsk_mgmt() should be able to
>  > handle the condition req->scmnd->device == NULL.
>
> Well, I don't see how the reset ioctl can do anything useful unless it
> passes a device in with the scsi command -- otherwise for example
> srp_reset_device() has no idea what LUN to try and reset.

(added linux-scsi in CC)

I hope one of the SCSI people can tell us why scsi_reset_provider()
passes the value NULL in req->scmnd->device to
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

       reply	other threads:[~2009-08-05 17:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <e2e108260908030621q102437e0ua60aa5bdfacb2e7e@mail.gmail.com>
     [not found] ` <adafxc8ocst.fsf@cisco.com>
     [not found]   ` <e2e108260908040907l6537c2dcveb64615a664a047e@mail.gmail.com>
     [not found]     ` <adafxc7mtn8.fsf@cisco.com>
     [not found]       ` <e2e108260908041125w730869c0s8d212e2765598c42@mail.gmail.com>
     [not found]         ` <adaljlzl0ne.fsf@cisco.com>
     [not found]           ` <e2e108260908050800p3a6613bbib95fa670248a863@mail.gmail.com>
     [not found]             ` <adaiqh2jgug.fsf@cisco.com>
2009-08-05 17:48               ` Bart Van Assche [this message]
2009-08-05 17:54               ` [PATCH 2.6.30.4] Fix for NULL pointer dereference by SRP initiator triggered by a SCSI reset after the SRP connection has been closed Bart Van Assche
2009-08-05 20:37                 ` James Bottomley

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=e2e108260908051048l41939aesd8b4769aae22f4b@mail.gmail.com \
    --to=bart.vanassche@gmail.com \
    --cc=general@lists.openfabrics.org \
    --cc=hal.rosenstock@gmail.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=rdreier@cisco.com \
    --cc=sean.hefty@intel.com \
    --cc=vst@vlnb.net \
    /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