[ofa-general] 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
Roland Dreier
rdreier at cisco.com
Mon Aug 3 13:36:02 PDT 2009
> Issuing a SCSI reset command on an SRP initiator after the SRP connection has
> been closed triggers a NULL pointer dereference. The patch below fixes this
> NULL pointer dereference.
>
> See also http://bugzilla.kernel.org/show_bug.cgi?id=13893.
Thanks for debugging this... a couple of questions:
> + BUG_ON(!req->scmnd->device);
Why BUG_ON() here? Can we return failure or something, rather than
crashing the whole system?
> + if (!req->scmnd->device)
> + return FAILED;
How do we end up in srp_reset_device() with req->scmnd->device == NULL?
Presumably req->scmnd should match scmnd if I am understanding the code
properly -- and then scmnd->device == NULL??
- R.
More information about the general
mailing list