20 Jan
2026
20 Jan
'26
9:08 a.m.
On 1/19/26 05:40, David Gibson wrote:
On Fri, Jan 16, 2026 at 01:55:57PM +0100, Laurent Vivier wrote:
When tcp_epoll_ctl() handles a CLOSED connection, it removes the timer from epoll but leaves the fd open until tcp_flow_defer() eventually closes it.
Close the timer fd immediately when removing it from epoll, since there's no reason to keep an fd around that's no longer monitored. Set conn->timer to -1 to prevent a double-close in tcp_flow_defer().
This seems safe to me, but is there any actual advantage to it?
No, you're right, there's no real advantage. Please drop this patch. Thanks, Laurent