diff --git a/net/tipc/socket.c b/net/tipc/socket.c index 66666805b53cc3d91a6c261f67f5f899dd26097c..4a98d15a13239ff514e14d67e4ae39745f410c15 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c @@ -1802,12 +1802,11 @@ static int tipc_sk_enqueue(struct sk_buff_head *inputq, struct sock *sk, unsigned long time_limit = jiffies + 2; while (skb_queue_len(inputq)) { + if (unlikely(time_after_eq(jiffies, time_limit))) + return TIPC_OK; skb = tipc_skb_dequeue(inputq, dport); if (unlikely(!skb)) return TIPC_OK; - /* Return if softirq window exhausted */ - if (unlikely(time_after_eq(jiffies, time_limit))) - return TIPC_OK; if (!sock_owned_by_user(sk)) { err = filter_rcv(sk, &skb); if (likely(!skb))