diff options
author | 2016-10-26 16:44:44 -0700 | |
---|---|---|
committer | 2016-10-26 16:44:44 -0700 | |
commit | a129adf13af4169b77e4917f08a595ee7d77a70b (patch) | |
tree | 382b934deaea2e27f2bbf1d8f86dfefde12854c1 /src | |
parent | 9dc49b787baa1426b058f95d0f9a5ed29f429608 (diff) |
Remove fd from polling island before deleting it
Diffstat (limited to 'src')
-rw-r--r-- | src/core/lib/iomgr/ev_epoll_linux.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index 8381f4a63a..4358020f9b 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -1711,6 +1711,12 @@ retry: "pollset_add_fd: Raced creating new polling island. pi_new: %p " "(fd: %d, pollset: %p)", (void *)pi_new, fd->fd, (void *)pollset); + + /* No need to lock 'pi_new' here since this is a new polling island and + no one has a reference to it yet */ + polling_island_remove_all_fds_locked(pi_new, true, &error); + + /* Ref and unref so that the polling island gets deleted during unref */ PI_ADD_REF(pi_new, "dance_of_destruction"); PI_UNREF(exec_ctx, pi_new, "dance_of_destruction"); goto retry; |