diff options
author | Juanli Shen <juanlishen@google.com> | 2018-09-27 15:32:07 -0700 |
---|---|---|
committer | Juanli Shen <juanlishen@google.com> | 2018-09-27 15:32:07 -0700 |
commit | 1097ae5e50c7ea8d8d459fcc25b1aad82f11546c (patch) | |
tree | 0bf73e9ffb72c6a5681dd44d42265efaf4f32fef /src/core/lib/iomgr/ev_epollex_linux.cc | |
parent | a9f8bcce11544702d93e8f60d18de7dd3a5e835a (diff) |
Add TODO in fd_global_shutdown()
Diffstat (limited to 'src/core/lib/iomgr/ev_epollex_linux.cc')
-rw-r--r-- | src/core/lib/iomgr/ev_epollex_linux.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/lib/iomgr/ev_epollex_linux.cc b/src/core/lib/iomgr/ev_epollex_linux.cc index b082634af1..06a382c556 100644 --- a/src/core/lib/iomgr/ev_epollex_linux.cc +++ b/src/core/lib/iomgr/ev_epollex_linux.cc @@ -403,6 +403,10 @@ static void unref_by(grpc_fd* fd, int n) { 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) { |