]> git.baikalelectronics.ru Git - kernel.git/commit
IB/srp: Fix a race condition between failing I/O and I/O completion
authorBart Van Assche <bvanassche@acm.org>
Fri, 14 Mar 2014 12:54:11 +0000 (13:54 +0100)
committerRoland Dreier <roland@purestorage.com>
Mon, 24 Mar 2014 17:05:31 +0000 (10:05 -0700)
commita2198578344e0c3ea1f5bfd2fe3471ff3dfd96b8
tree6df463ae165b00ab3ca3f005e98853f8c97e2565
parentff52bf7232ef7677c6cfdda0e20f01fa38fd9edb
IB/srp: Fix a race condition between failing I/O and I/O completion

Avoid that srp_terminate_io() can access req->scmnd after it has been
cleared by the I/O completion code. Do this by protecting req->scmnd
accesses from srp_terminate_io() via locking

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Acked-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/ulp/srp/ib_srp.c