diff --git a/net/xdp/xsk.c b/net/xdp/xsk.c index 04652797cd37..2bc0d6e3e124 100644 --- a/net/xdp/xsk.c +++ b/net/xdp/xsk.c @@ -429,11 +429,13 @@ static int xsk_sendmsg(struct socket *sock, struct msghdr *m, size_t total_len) static __poll_t xsk_poll(struct file *file, struct socket *sock, struct poll_table_struct *wait) { - __poll_t mask = datagram_poll(file, sock, wait); + __poll_t mask = 0; struct sock *sk = sock->sk; 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;