]> git.baikalelectronics.ru Git - kernel.git/commit
IB/srp: Avoid duplicate connections
authorBart Van Assche <bvanassche@acm.org>
Fri, 14 Mar 2014 12:52:45 +0000 (13:52 +0100)
committerRoland Dreier <roland@purestorage.com>
Mon, 24 Mar 2014 17:05:31 +0000 (10:05 -0700)
commitb786ca032b8ce06f65442785d79fd03fd8569f55
tree10af70bb397f7c23f3d6f581a37a1a557d53abbd
parent4505b13a767b3ec3ac2727e7609d4aa64ab273ca
IB/srp: Avoid duplicate connections

The connection uniqueness check is performed before a new connection
is added to the target list. This patch protects both actions by a
mutex such that simultaneous writes from two different threads into the
"add_target" variable do not result in duplicate connections.

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