Skip to content

Commit

Permalink
net: add __must_check to sk_add_backlog
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Zhu Yi authored and David S. Miller committed Mar 8, 2010
1 parent 10cc2b5 commit 4045635
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/net/sock.h
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,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;
Expand Down

0 comments on commit 4045635

Please sign in to comment.