* 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 [not found] ` <adaiqh2jgug.fsf@cisco.com> @ 2009-08-05 17:48 ` Bart Van Assche 2009-08-05 17:54 ` Bart Van Assche 1 sibling, 0 replies; 3+ messages in thread From: Bart Van Assche @ 2009-08-05 17:48 UTC (permalink / raw) To: Roland Dreier Cc: Sean Hefty, Hal Rosenstock, OpenIB, Vladislav Bolkhovitin, linux-scsi 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 ^ permalink raw reply [flat|nested] 3+ messages in thread
* 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 [not found] ` <adaiqh2jgug.fsf@cisco.com> 2009-08-05 17:48 ` [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 17:54 ` Bart Van Assche 2009-08-05 20:37 ` James Bottomley 1 sibling, 1 reply; 3+ messages in thread From: Bart Van Assche @ 2009-08-05 17:54 UTC (permalink / raw) To: Roland Dreier Cc: Sean Hefty, Hal Rosenstock, OpenIB, Vladislav Bolkhovitin, linux-scsi 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 whether the behavior that scsi_reset_provider() passes the value NULL in req->scmnd->device to scsi_try_bus_device_reset() is correct ? Bart. -- 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 ^ permalink raw reply [flat|nested] 3+ messages in thread
* 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 2009-08-05 17:54 ` Bart Van Assche @ 2009-08-05 20:37 ` James Bottomley 0 siblings, 0 replies; 3+ messages in thread From: James Bottomley @ 2009-08-05 20:37 UTC (permalink / raw) To: Bart Van Assche Cc: Roland Dreier, Sean Hefty, Hal Rosenstock, OpenIB, Vladislav Bolkhovitin, linux-scsi On Wed, 2009-08-05 at 19:54 +0200, Bart Van Assche wrote: > 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 whether the behavior that > scsi_reset_provider() > passes the value NULL in req->scmnd->device to > scsi_try_bus_device_reset() is correct ? Need more information. cmd->device is supposed to be initialised in scsi_get_command(), which scsi_reset_provider() calls ... why do you think it got set to null? James ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-08-05 20:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[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 ` [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 17:54 ` Bart Van Assche
2009-08-05 20:37 ` James Bottomley
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox