vlib: crash in linux_epoll_input_inline for accessing free file index [VPP-1412] 38/14738/2
authorSteven <sluong@cisco.com>
Sat, 8 Sep 2018 21:06:16 +0000 (14:06 -0700)
committerSteven <sluong@cisco.com>
Sat, 8 Sep 2018 21:22:08 +0000 (14:22 -0700)
commitaec7297ba012e1fe4bbf85cdaec8e810aa476cea
tree8e07827b19b0be5bc0e56e2499ef6bfebc9e8720
parentd783d1d6bf869169df7f3cfc44f110f7869806f3
vlib: crash in linux_epoll_input_inline for accessing free file index [VPP-1412]

Under rare scenario, epoll may still post an event to VPP although the file
descriptor is already deleted via epoll_ctl (EPOLL_CTL_DEL) and the file
descriptor is close. VPP tries to access the free file index entry and crash.

The fix is to throw away the events which the file descriptor is already deleted.

Change-Id: Ieca3a1873aecb28630c3abc42c40341f27c2faa7
Signed-off-by: Steven <sluong@cisco.com>
src/vlib/unix/input.c