Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
[pandora-kernel.git] / net / core / sock.c
index 84d6de8..bc745d0 100644 (file)
 
 #include <linux/filter.h>
 
+#include <trace/events/sock.h>
+
 #ifdef CONFIG_INET
 #include <net/tcp.h>
 #endif
@@ -292,6 +294,7 @@ int sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
        if (atomic_read(&sk->sk_rmem_alloc) + skb->truesize >=
            (unsigned)sk->sk_rcvbuf) {
                atomic_inc(&sk->sk_drops);
+               trace_sock_rcvqueue_full(sk, skb);
                return -ENOMEM;
        }
 
@@ -1736,6 +1739,8 @@ suppress_allocation:
                        return 1;
        }
 
+       trace_sock_exceed_buf_limit(sk, prot, allocated);
+
        /* Alas. Undo changes. */
        sk->sk_forward_alloc -= amt * SK_MEM_QUANTUM;
        atomic_long_sub(amt, prot->memory_allocated);