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.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index ee61b3fc4cae..45a8a7e374d8 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -1063,25 +1063,22 @@ EXPORT_SYMBOL(udp_lib_unhash);
1063 1063
1064static int __udp_queue_rcv_skb(struct sock *sk, struct sk_buff *skb) 1064static int __udp_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
1065{ 1065{
1066 int is_udplite = IS_UDPLITE(sk); 1066 int rc = sock_queue_rcv_skb(sk, skb);
1067 int rc; 1067
1068 if (rc < 0) {
1069 int is_udplite = IS_UDPLITE(sk);
1068 1070
1069 if ((rc = sock_queue_rcv_skb(sk, skb)) < 0) {
1070 /* Note that an ENOMEM error is charged twice */ 1071 /* Note that an ENOMEM error is charged twice */
1071 if (rc == -ENOMEM) { 1072 if (rc == -ENOMEM)
1072 UDP_INC_STATS_BH(sock_net(sk), UDP_MIB_RCVBUFERRORS, 1073 UDP_INC_STATS_BH(sock_net(sk), UDP_MIB_RCVBUFERRORS,
1073 is_udplite); 1074 is_udplite);
1074 atomic_inc(&sk->sk_drops); 1075 UDP_INC_STATS_BH(sock_net(sk), UDP_MIB_INERRORS, is_udplite);
1075 } 1076 kfree_skb(skb);
1076 goto drop; 1077 return -1;
1077 } 1078 }
1078 1079
1079 return 0; 1080 return 0;
1080 1081
1081drop:
1082 UDP_INC_STATS_BH(sock_net(sk), UDP_MIB_INERRORS, is_udplite);
1083 kfree_skb(skb);
1084 return -1;
1085} 1082}
1086 1083
1087/* returns: 1084/* returns: