From: Sagi Grimberg Date: Sun, 7 Dec 2014 14:09:59 +0000 (+0200) Subject: IB/iser: Fix race between iser connection teardown and scsi TMFs X-Git-Tag: omap-for-v3.19/fixes-rc1~37^2^4~8 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7414dde0a6c3a958e;p=pandora-kernel.git IB/iser: Fix race between iser connection teardown and scsi TMFs In certain scenarios (target kill with live IO) scsi TMFs may race with iser RDMA teardown, which might cause NULL dereference on iser IB device handle (which might have been freed). In this case we take a conditional lock for TMFs and check the connection state (avoid introducing lock contention in the IO path). This is indeed best effort approach, but sufficient to survive multi targets sudden death while heavy IO is inflight. While we are on it, add a nice kernel-doc style documentation. Reported-by: Ariel Nahum Signed-off-by: Sagi Grimberg Signed-off-by: Or Gerlitz Signed-off-by: Roland Dreier --- Reading git-diff-tree failed