aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/sock.h
diff options
context:
space:
mode:
authorZhu Yi <yi.zhu@intel.com>2010-03-07 11:21:39 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2010-04-01 19:02:05 -0400
commitcb63112d399b25ce7e4a5d84065f342b978cd9a4 (patch)
treed05bb9fc21ea524a91be4c463ee41a34df79389b /include/net/sock.h
parenta12a9a26ff389892df27e2ff4cbf03e5b2ed0d64 (diff)
net: add __must_check to sk_add_backlog
[ 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>
Diffstat (limited to 'include/net/sock.h')
-rw-r--r--include/net/sock.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/sock.h b/include/net/sock.h
index 01eedfd3e1e3..86f2da1b9488 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -589,7 +589,7 @@ static inline void __sk_add_backlog(struct sock *sk, struct sk_buff *skb)
589} 589}
590 590
591/* The per-socket spinlock must be held here. */ 591/* The per-socket spinlock must be held here. */
592static inline int sk_add_backlog(struct sock *sk, struct sk_buff *skb) 592static inline __must_check int sk_add_backlog(struct sock *sk, struct sk_buff *skb)
593{ 593{
594 if (sk->sk_backlog.len >= max(sk->sk_backlog.limit, sk->sk_rcvbuf << 1)) 594 if (sk->sk_backlog.len >= max(sk->sk_backlog.limit, sk->sk_rcvbuf << 1))
595 return -ENOBUFS; 595 return -ENOBUFS;