summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorEric Dumazet <dada1@cosmosbay.com>2009-02-02 13:41:57 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2009-02-17 09:46:23 -0800
commit03b0d4d0c3d219d3b163e4e9b160da9c36057579 (patch)
tree09822455063226314153683ee9657da4946112bf /net
parent2c55d86dc58c8e530d8cdff30e8529373dfa4804 (diff)
udp: increments sk_drops in __udp_queue_rcv_skb()
[ Upstream commit e408b8dcb5ce42243a902205005208e590f28454 ] Commit 93821778def10ec1e69aa3ac10adee975dad4ff3 (udp: Fix rcv socket locking) accidentally removed sk_drops increments for UDP IPV4 sockets. This field can be used to detect incorrect sizing of socket receive buffers. Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/udp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index f4ccd672d11b..a9b62ee588f0 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -959,9 +959,11 @@ static int __udp_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
if ((rc = sock_queue_rcv_skb(sk, skb)) < 0) {
/* Note that an ENOMEM error is charged twice */
- if (rc == -ENOMEM)
+ if (rc == -ENOMEM) {
UDP_INC_STATS_BH(sock_net(sk), UDP_MIB_RCVBUFERRORS,
is_udplite);
+ atomic_inc(&sk->sk_drops);
+ }
goto drop;
}