trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jpe...@apache.org
Subject git commit: TS-2317: read/write mutex of PluginVC may be held without release
Date Mon, 04 Nov 2013 21:14:34 GMT
Updated Branches:
  refs/heads/master bf8b35551 -> ba3f6c85b


TS-2317: read/write mutex of PluginVC may be held without release


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/ba3f6c85
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/ba3f6c85
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/ba3f6c85

Branch: refs/heads/master
Commit: ba3f6c85be13cbe741d1200e35115f64ecd4e3b8
Parents: bf8b355
Author: portl4t <portl4t.cn@gmail.com>
Authored: Mon Nov 4 13:13:33 2013 -0800
Committer: James Peach <jpeach@apache.org>
Committed: Mon Nov 4 13:13:33 2013 -0800

----------------------------------------------------------------------
 CHANGES           | 3 +++
 proxy/PluginVC.cc | 9 +++++++++
 2 files changed, 12 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/ba3f6c85/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index e06d376..e796a5d 100644
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,9 @@
 Changes with Apache Traffic Server 4.1.0
 
 
+  *) [TS-2317] Read/write mutex of PluginVC may be held without release.
+   Author: portl4t.cn@gmail.com
+
   *) [TS-2315] ESI Plugin: fetcher does not handle error gracefully.
    Author: Kit Chan.
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/ba3f6c85/proxy/PluginVC.cc
----------------------------------------------------------------------
diff --git a/proxy/PluginVC.cc b/proxy/PluginVC.cc
index 01e5f53..66a4a7b 100644
--- a/proxy/PluginVC.cc
+++ b/proxy/PluginVC.cc
@@ -168,6 +168,15 @@ PluginVC::main_handler(int event, void *data)
 
   if (closed) {
     process_close();
+
+    if (read_mutex_held) {
+      Mutex_unlock(read_side_mutex, my_ethread);
+    }
+
+    if (write_mutex_held) {
+      Mutex_unlock(write_side_mutex, my_ethread);
+    }
+
     return 0;
   }
   // We can get closed while we're calling back the


Mime
View raw message