From: Florin Coras Date: Mon, 22 Apr 2019 16:49:10 +0000 (-0700) Subject: vlib epoll: handle file removal on EPOLLIN VPP-1656 X-Git-Tag: v19.04~2 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=2f61df5764828413a4fd95093e6aabc27b9ff705;p=vpp.git vlib epoll: handle file removal on EPOLLIN VPP-1656 Change-Id: I7a3526a8fdf17afb8cc2225bdfbd57f661680992 Signed-off-by: Florin Coras --- 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; }