]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/iwcm: Don't call provider reject func with irqs disabled
authorSteve Wise <swise@opengridcomputing.com>
Wed, 7 Oct 2009 22:38:12 +0000 (15:38 -0700)
committerRoland Dreier <rolandd@cisco.com>
Wed, 7 Oct 2009 22:38:12 +0000 (15:38 -0700)
commitbb12a4308c829793ff2fcc055dd6c204ab5de9d1
tree0a3b395301d4611ca1338265d5eb68685f4d9f44
parent4b6704854405d74d55de15be730b05c4a1c239a7
RDMA/iwcm: Don't call provider reject func with irqs disabled

In commit 0f19702f ("RDMA/iwcm: Reject the connection when the cm_id
is destroyed") a call to the provider's reject handler was added to
destroy_cm_id() to fix a provider endpoint leak.  This call needs to
be done with interrupts enabled.  So unlock and relock around this
call.  This is safe because:

1) the provider will do nothing with this endpoint until the iwcm either
   accepts or rejects.
2) the lock is only released after the iwcm state is changed, so an
   errant iwcm app that is destroying -and- rejecting the connection
   concurrently will get a failure on one of the calls.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/core/iwcm.c