]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
net: add __must_check to sk_add_backlog
authorZhu Yi <yi.zhu@intel.com>
Sun, 7 Mar 2010 16:21:39 +0000 (16:21 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 1 Apr 2010 23:02:05 +0000 (16:02 -0700)
[ Upstream commit 4045635318538d3ddd2007720412fdc4b08f6a62 ]

Add the "__must_check" tag to sk_add_backlog() so that any failure to
check and drop packets will be warned about.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
include/net/sock.h

index 01eedfd3e1e32e2920b2fefe9beb6c067257673e..86f2da1b94886f3f500d94a0914745c93eebf256 100644 (file)
@@ -589,7 +589,7 @@ static inline void __sk_add_backlog(struct sock *sk, struct sk_buff *skb)
 }
 
 /* The per-socket spinlock must be held here. */
-static inline int sk_add_backlog(struct sock *sk, struct sk_buff *skb)
+static inline __must_check int sk_add_backlog(struct sock *sk, struct sk_buff *skb)
 {
        if (sk->sk_backlog.len >= max(sk->sk_backlog.limit, sk->sk_rcvbuf << 1))
                return -ENOBUFS;