aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/iomgr/ev_epollex_linux.cc
diff options
context:
space:
mode:
authorGravatar Yash Tibrewal <yashkt@google.com>2018-06-08 14:10:14 -0700
committerGravatar Yash Tibrewal <yashkt@google.com>2018-06-08 14:10:14 -0700
commit935ae7d01242c21f0230ead18927087a70c03e5b (patch)
tree98ce8490adf095e4e1255f9af00e78d56640b583 /src/core/lib/iomgr/ev_epollex_linux.cc
parent21e360382f7f022aed6cdd2522ebc33aaf6d7436 (diff)
More comments
Diffstat (limited to 'src/core/lib/iomgr/ev_epollex_linux.cc')
-rw-r--r--src/core/lib/iomgr/ev_epollex_linux.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/lib/iomgr/ev_epollex_linux.cc b/src/core/lib/iomgr/ev_epollex_linux.cc
index 22b13d058f..be400c6ee9 100644
--- a/src/core/lib/iomgr/ev_epollex_linux.cc
+++ b/src/core/lib/iomgr/ev_epollex_linux.cc
@@ -594,7 +594,8 @@ static grpc_error* pollable_add_fd(pollable* p, grpc_fd* fd) {
static_cast<uint32_t>(EPOLLET | EPOLLIN | EPOLLOUT | EPOLLEXCLUSIVE);
/* Use the second least significant bit of ev_fd.data.ptr to store track_err
* to avoid synchronization issues when accessing it after receiving an event.
- */
+ * Accessing fd would be a data race there because the fd might have been
+ * returned to the free list at that point. */
ev_fd.data.ptr = reinterpret_cast<void*>(reinterpret_cast<intptr_t>(fd) |
(fd->track_err ? 2 : 0));
GRPC_STATS_INC_SYSCALL_EPOLL_CTL();