IB/iser: Fix race between iser connection teardown and scsi TMFs
authorSagi Grimberg <sagig@mellanox.com>
Sun, 7 Dec 2014 14:09:59 +0000 (16:09 +0200)
committerRoland Dreier <roland@purestorage.com>
Tue, 16 Dec 2014 02:11:44 +0000 (18:11 -0800)
commit7414dde0a6c3a958e26141991bf5c75dc58d28b2
tree13cf3044f5372fdc7be1b1ee7c63e57b79dd320f
parent3f562a0b8f0b47c4315e08bccd6a0b2d7f5aae1b
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 <arieln@mellanox.com>
Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/ulp/iser/iscsi_iser.c
This page took 0.025897 seconds and 5 git commands to generate.