aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlib
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-04-22 09:49:10 -0700
committerDave Wallace <dwallacelf@gmail.com>2019-04-22 18:31:31 +0000
commit81f54a5c5fa7328461bd613bf95eb6cb8ded338d (patch)
tree281e14d811c8b44d85fabe16fade707cfd2c04fa /src/vlib
parent99ad2fc3e4ee2688639d7adabf8a857aa45720ff (diff)
vlib epoll: handle file removal on EPOLLIN
Change-Id: I7a3526a8fdf17afb8cc2225bdfbd57f661680992 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vlib')
-rw-r--r--src/vlib/unix/input.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/vlib/unix/input.c b/src/vlib/unix/input.c
index 318043ea6ed..7f49b954cc2 100644
--- a/src/vlib/unix/input.c
+++ b/src/vlib/unix/input.c
@@ -288,6 +288,8 @@ linux_epoll_input_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
f->read_events++;
errors[n_errors] = f->read_function (f);
/* Make sure f is valid if the file pool moves */
+ if (pool_is_free_index (fm->file_pool, i))
+ continue;
f = pool_elt_at_index (fm->file_pool, i);
n_errors += errors[n_errors] != 0;
}