[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

Bart Van Assche bart.vanassche at gmail.com
Tue Aug 4 09:30:18 PDT 2009


On Tue, Aug 4, 2009 at 6:27 PM, Roland Dreier<rdreier at cisco.com> wrote:
>
>  > An update: apparently it is possible to trigger scmnd->device == NULL even
>  > without triggering a prior IB CM disconnect. The following shell commands
>  > are sufficient to trigger the WARN_ON statement in the patch below:
>
>  > rmmod ib_srp
>  > modprobe ib_srp
>  > ibsrpdm -c | while read target_info; do echo "${target_info}"; echo
>  > "${target_info}" >/sys/class/infiniband_srp/srp-mlx4_0-1/add_target;
>  > done
>  > sg_reset -d ${srp_device}
>
> So in other words, just sg_reset on an SRP device triggers the warning?

Yes, but only if no I/O has been performed after the ${srp_device} has
been created and before the sg_reset has been issued. When e.g. the
command dd if=${srp_device} of=/dev/null iflag=direct bs=1M is
inserted just before the sg_reset command, the kernel warning is not
triggered.

Bart.



More information about the general mailing list