aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/udp.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/udp.c')
-rw-r--r--net/ipv4/udp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index 9bb27df4dac5..24e116ddae79 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -2591,7 +2591,7 @@ int compat_udp_getsockopt(struct sock *sk, int level, int optname,
2591 * udp_poll - wait for a UDP event. 2591 * udp_poll - wait for a UDP event.
2592 * @file - file struct 2592 * @file - file struct
2593 * @sock - socket 2593 * @sock - socket
2594 * @events - events to wait for 2594 * @wait - poll table
2595 * 2595 *
2596 * This is same as datagram poll, except for the special case of 2596 * This is same as datagram poll, except for the special case of
2597 * blocking sockets. If application is using a blocking fd 2597 * blocking sockets. If application is using a blocking fd
@@ -2600,23 +2600,23 @@ int compat_udp_getsockopt(struct sock *sk, int level, int optname,
2600 * but then block when reading it. Add special case code 2600 * but then block when reading it. Add special case code
2601 * to work around these arguably broken applications. 2601 * to work around these arguably broken applications.
2602 */ 2602 */
2603__poll_t udp_poll_mask(struct socket *sock, __poll_t events) 2603__poll_t udp_poll(struct file *file, struct socket *sock, poll_table *wait)
2604{ 2604{
2605 __poll_t mask = datagram_poll_mask(sock, events); 2605 __poll_t mask = datagram_poll(file, sock, wait);
2606 struct sock *sk = sock->sk; 2606 struct sock *sk = sock->sk;
2607 2607
2608 if (!skb_queue_empty(&udp_sk(sk)->reader_queue)) 2608 if (!skb_queue_empty(&udp_sk(sk)->reader_queue))
2609 mask |= EPOLLIN | EPOLLRDNORM; 2609 mask |= EPOLLIN | EPOLLRDNORM;
2610 2610
2611 /* Check for false positives due to checksum errors */ 2611 /* Check for false positives due to checksum errors */
2612 if ((mask & EPOLLRDNORM) && !(sock->file->f_flags & O_NONBLOCK) && 2612 if ((mask & EPOLLRDNORM) && !(file->f_flags & O_NONBLOCK) &&
2613 !(sk->sk_shutdown & RCV_SHUTDOWN) && first_packet_length(sk) == -1) 2613 !(sk->sk_shutdown & RCV_SHUTDOWN) && first_packet_length(sk) == -1)
2614 mask &= ~(EPOLLIN | EPOLLRDNORM); 2614 mask &= ~(EPOLLIN | EPOLLRDNORM);
2615 2615
2616 return mask; 2616 return mask;
2617 2617
2618} 2618}
2619EXPORT_SYMBOL(udp_poll_mask); 2619EXPORT_SYMBOL(udp_poll);
2620 2620
2621int udp_abort(struct sock *sk, int err) 2621int udp_abort(struct sock *sk, int err)
2622{ 2622{