tcp: Fix race in tcp_poll