Rx: restore thread safety to rx_NewCall
Thread safety in rx_NewCall requires that only one thread be
actively allocating or recycling a call at a time. Since we are
no longer holding the conn_call_lock across the entire transaction
we need to have another synchronization mechanism. Add a new
rx_connection flag, RX_CONN_MAKECALL_ACTIVE, which when set indicates
that a thread is actively obtaining a call. If any other threads
see this flag set, they will wait until being signalled that the
thread has completed its activity.
In addition, because the call->lock may be dropped when processing
rxi_ResetCall(), we must hold a reference to the call once we
begin using it. Otherwise, the call may be garbage collected
behind our back.
Change-Id: Ie97757f812d7043203ffcaf399400789cda39da1
Reviewed-on: http://gerrit.openafs.org/1755
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>