From: Bart Van Assche Date: Tue, 20 May 2014 13:03:49 +0000 (+0200) Subject: IB/srp: Fix a sporadic crash triggered by cable pulling X-Git-Tag: omap-for-v3.16/fixes-against-rc1~68^2^12~9 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=024ca90151f5e4296d30f72c13ff9a075e23c9ec;p=pandora-kernel.git IB/srp: Fix a sporadic crash triggered by cable pulling Avoid that the loops that iterate over the request ring can encounter a pointer to a SCSI command in req->scmnd that is no longer associated with that request. If the function srp_unmap_data() is invoked twice for a SCSI command that is not in flight then that would cause ib_fmr_pool_unmap() to be invoked with an invalid pointer as argument, resulting in a kernel oops. Reported-by: Sagi Grimberg Reference: http://thread.gmane.org/gmane.linux.drivers.rdma/19068/focus=19069 Signed-off-by: Bart Van Assche Reviewed-by: Sagi Grimberg Cc: stable Signed-off-by: Roland Dreier --- Reading git-diff-tree failed