--- a/net/xdp/xsk.c +++ b/net/xdp/xsk.c @@ -434,8 +434,6 @@ static __poll_t xsk_poll(struct file *fi struct xdp_sock *xs = xdp_sk(sk); struct xdp_umem *umem; - sock_poll_wait(file, sock, wait); - if (unlikely(!xsk_is_bound(xs))) return mask; @@ -447,6 +445,8 @@ static __poll_t xsk_poll(struct file *fi else /* Poll needs to drive Tx also in copy mode */ __xsk_sendmsg(sk); + } else { + sock_poll_wait(file, sock, wait); } if (xs->rx && !xskq_empty_desc(xs->rx))