aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/iomgr/ev_epoll1_linux.cc
diff options
context:
space:
mode:
authorGravatar Sree Kuchibhotla <sreek@google.com>2018-09-28 16:38:53 -0700
committerGravatar Sree Kuchibhotla <sreek@google.com>2018-09-28 16:38:53 -0700
commit4f940918b126dc9348b1f2e21d66fc6aeae4b193 (patch)
tree0ff0f7f25d52c26b9f6053b54500ebbb6df74602 /src/core/lib/iomgr/ev_epoll1_linux.cc
parent82b2e2977d5cd144c6e2350d55b6f928fd8f6ce7 (diff)
parentf15e3bbc357bd542d83d6b478621bc1f0c3b1f8c (diff)
Merge branch 'master' into sreek-pe-doc
Diffstat (limited to 'src/core/lib/iomgr/ev_epoll1_linux.cc')
-rw-r--r--src/core/lib/iomgr/ev_epoll1_linux.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/lib/iomgr/ev_epoll1_linux.cc b/src/core/lib/iomgr/ev_epoll1_linux.cc
index aa5016bd8f..6ef889b0fe 100644
--- a/src/core/lib/iomgr/ev_epoll1_linux.cc
+++ b/src/core/lib/iomgr/ev_epoll1_linux.cc
@@ -273,6 +273,10 @@ static gpr_mu fork_fd_list_mu;
static void fd_global_init(void) { gpr_mu_init(&fd_freelist_mu); }
static void fd_global_shutdown(void) {
+ // TODO(guantaol): We don't have a reasonable explanation about this
+ // lock()/unlock() pattern. It can be a valid barrier if there is at most one
+ // pending lock() at this point. Otherwise, there is still a possibility of
+ // use-after-free race. Need to reason about the code and/or clean it up.
gpr_mu_lock(&fd_freelist_mu);
gpr_mu_unlock(&fd_freelist_mu);
while (fd_freelist != nullptr) {