aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp
diff options
context:
space:
mode:
Diffstat (limited to 'net/sctp')
-rw-r--r--net/sctp/socket.c5
-rw-r--r--net/sctp/ulpqueue.c4
2 files changed, 9 insertions, 0 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index fee06b99a4da..e37b2cbbf177 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -71,6 +71,7 @@
71#include <net/route.h> 71#include <net/route.h>
72#include <net/ipv6.h> 72#include <net/ipv6.h>
73#include <net/inet_common.h> 73#include <net/inet_common.h>
74#include <net/busy_poll.h>
74 75
75#include <linux/socket.h> /* for sa_family_t */ 76#include <linux/socket.h> /* for sa_family_t */
76#include <linux/export.h> 77#include <linux/export.h>
@@ -6557,6 +6558,10 @@ static struct sk_buff *sctp_skb_recv_datagram(struct sock *sk, int flags,
6557 if (sk->sk_shutdown & RCV_SHUTDOWN) 6558 if (sk->sk_shutdown & RCV_SHUTDOWN)
6558 break; 6559 break;
6559 6560
6561 if (sk_can_busy_loop(sk) &&
6562 sk_busy_loop(sk, noblock))
6563 continue;
6564
6560 /* User doesn't want to wait. */ 6565 /* User doesn't want to wait. */
6561 error = -EAGAIN; 6566 error = -EAGAIN;
6562 if (!timeo) 6567 if (!timeo)
diff --git a/net/sctp/ulpqueue.c b/net/sctp/ulpqueue.c
index 7144eb6a1b95..d49dc2ed30ad 100644
--- a/net/sctp/ulpqueue.c
+++ b/net/sctp/ulpqueue.c
@@ -38,6 +38,7 @@
38#include <linux/types.h> 38#include <linux/types.h>
39#include <linux/skbuff.h> 39#include <linux/skbuff.h>
40#include <net/sock.h> 40#include <net/sock.h>
41#include <net/busy_poll.h>
41#include <net/sctp/structs.h> 42#include <net/sctp/structs.h>
42#include <net/sctp/sctp.h> 43#include <net/sctp/sctp.h>
43#include <net/sctp/sm.h> 44#include <net/sctp/sm.h>
@@ -204,6 +205,9 @@ int sctp_ulpq_tail_event(struct sctp_ulpq *ulpq, struct sctp_ulpevent *event)
204 if (sock_flag(sk, SOCK_DEAD) || (sk->sk_shutdown & RCV_SHUTDOWN)) 205 if (sock_flag(sk, SOCK_DEAD) || (sk->sk_shutdown & RCV_SHUTDOWN))
205 goto out_free; 206 goto out_free;
206 207
208 if (!sctp_ulpevent_is_notification(event))
209 sk_mark_napi_id(sk, skb);
210
207 /* Check if the user wishes to receive this event. */ 211 /* Check if the user wishes to receive this event. */
208 if (!sctp_ulpevent_is_enabled(event, &sctp_sk(sk)->subscribe)) 212 if (!sctp_ulpevent_is_enabled(event, &sctp_sk(sk)->subscribe))
209 goto out_free; 213 goto out_free;