aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/udp.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6/udp.c')
-rw-r--r--net/ipv6/udp.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
index 948e823d70c..2915e1dad72 100644
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -579,14 +579,20 @@ static void flush_stack(struct sock **stack, unsigned int count,
579 for (i = 0; i < count; i++) { 579 for (i = 0; i < count; i++) {
580 skb1 = (i == final) ? skb : skb_clone(skb, GFP_ATOMIC); 580 skb1 = (i == final) ? skb : skb_clone(skb, GFP_ATOMIC);
581 581
582 sk = stack[i];
582 if (skb1) { 583 if (skb1) {
583 sk = stack[i];
584 bh_lock_sock(sk); 584 bh_lock_sock(sk);
585 if (!sock_owned_by_user(sk)) 585 if (!sock_owned_by_user(sk))
586 udpv6_queue_rcv_skb(sk, skb1); 586 udpv6_queue_rcv_skb(sk, skb1);
587 else 587 else
588 sk_add_backlog(sk, skb1); 588 sk_add_backlog(sk, skb1);
589 bh_unlock_sock(sk); 589 bh_unlock_sock(sk);
590 } else {
591 atomic_inc(&sk->sk_drops);
592 UDP6_INC_STATS_BH(sock_net(sk),
593 UDP_MIB_RCVBUFERRORS, IS_UDPLITE(sk));
594 UDP6_INC_STATS_BH(sock_net(sk),
595 UDP_MIB_INERRORS, IS_UDPLITE(sk));
590 } 596 }
591 } 597 }
592} 598}