OpenAFS Master Repository branch, openafs-devel-1_7_x, updated. openafs-devel-1_7_8-28-g398303b
Gerrit Code Review
gerrit@openafs.org
Tue, 3 Apr 2012 07:47:03 -0700 (PDT)
The following commit has been merged in the openafs-devel-1_7_x branch:
commit 0349edb9f4fc617b8bb3f2c504d341518fdf25f7
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Jan 20 01:50:01 2012 -0500
Rx: rxi_FreeCall conn_call_lock vs call->lock deadlock
The conn->conn_call_lock is held before call->lock in the lock
hierarchy which is violated within rxi_FreeCall(). While the
deadlock is rare, it is possible and has been experienced on
both Windows and Linux.
Change the signature of rxi_FreeCall to return 1 if it frees
the call and 0 if it does not.
Due to the lock hierarchy violation use MUTEX_TRYENTER()
to attempt to obtain the conn->conn_call_lock. If the lock
cannot be obtained set the call state to dally and
return. If the conn_call_lock can be obtained, behave as
we did before this patchset.
Only increment the callNumber if the original call->state
was dally or hold and the conn_call_lock could be obtained.
We must not increment the callNumber otherwise. Doing so can
result in call numbers being skipped when the conn->call slot
is reused.
Reviewed-on: http://gerrit.openafs.org/6443
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry picked from commit 33185db16aca40a3bdbcb66caf994924220b5012)
Change-Id: I2b0f21dfb549eccd4b8f3b0be0a6b87d181ae726
Reviewed-on: http://gerrit.openafs.org/7038
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
src/rx/rx.c | 39 ++++++++++++++++++++++++++++-----------
1 files changed, 28 insertions(+), 11 deletions(-)
--
OpenAFS Master Repository