From fa717215da1fa6bffe4e51083f4f5439c699a28b Mon Sep 17 00:00:00 2001 From: Ethan Jackson Date: Wed, 10 Apr 2013 13:05:04 -0700 Subject: [PATCH] dpif-linux: Reset epoll() on channel deletion. The list of epoll events contains references to channels which may be stale when one of those channels is deleted. The safest thing to do is simply refresh epoll() whenever a channel is deleted. Bug #16057. Signed-off-by: Ethan Jackson --- lib/dpif-linux.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/dpif-linux.c b/lib/dpif-linux.c index 7293063fe..b863a2e21 100644 --- a/lib/dpif-linux.c +++ b/lib/dpif-linux.c @@ -358,6 +358,7 @@ del_channel(struct dpif_linux *dpif, uint32_t port_no) } epoll_ctl(dpif->epoll_fd, EPOLL_CTL_DEL, nl_sock_fd(ch->sock), NULL); + dpif->event_offset = dpif->n_events = 0; nl_sock_destroy(ch->sock); ch->sock = NULL; -- 2.43.0