Repository: trafficserver
Updated Branches:
refs/heads/5.3.x e740fb9bd -> cc74be078
TS-3896: Fix crash in OpenDir::close_write from unlocked mutex.
(cherry picked from commit 6a00f6f6686dbc47d268706adae9985b8ca2657f)
Conflicts:
iocore/net/SSLNetVConnection.cc
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/a2e33b03
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/a2e33b03
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/a2e33b03
Branch: refs/heads/5.3.x
Commit: a2e33b03bfadbb10be426037fe654ae6f9a3e8ed
Parents: e740fb9
Author: Alan M. Carroll <[email protected]>
Authored: Sat Sep 5 18:46:26 2015 -0500
Committer: Phil Sorber <[email protected]>
Committed: Tue Sep 8 10:40:29 2015 -0600
----------------------------------------------------------------------
iocore/net/SSLNetVConnection.cc | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a2e33b03/iocore/net/SSLNetVConnection.cc
----------------------------------------------------------------------
diff --git a/iocore/net/SSLNetVConnection.cc b/iocore/net/SSLNetVConnection.cc
index d7ef08f..f9a2e0c 100644
--- a/iocore/net/SSLNetVConnection.cc
+++ b/iocore/net/SSLNetVConnection.cc
@@ -383,6 +383,12 @@ SSLNetVConnection::net_read_io(NetHandler *nh, EThread
*lthread)
return;
}
+ MUTEX_TRY_LOCK_FOR(lock, s->vio.mutex, lthread, s->vio._cont);
+ if (!lock.is_locked()) {
+ readReschedule(nh);
+ return;
+ }
+ // If the key renegotiation failed it's over, just signal the error and
finish.
if (sslClientRenegotiationAbort == true) {
this->read.triggered = 0;
readSignalError(nh, (int)r);
@@ -390,11 +396,6 @@ SSLNetVConnection::net_read_io(NetHandler *nh, EThread
*lthread)
return;
}
- MUTEX_TRY_LOCK_FOR(lock, s->vio.mutex, lthread, s->vio._cont);
- if (!lock.is_locked()) {
- readReschedule(nh);
- return;
- }
// If it is not enabled, lower its priority. This allows
// a fast connection to speed match a slower connection by
// shifting down in priority even if it could read.