]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/2.6.33.2/net-add-__must_check-to-sk_add_backlog.patch
5.0-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 2.6.33.2 / net-add-__must_check-to-sk_add_backlog.patch
1 From 256010274c8212e7dbe26bbf2a84d8705733d50e Mon Sep 17 00:00:00 2001
2 From: Zhu Yi <yi.zhu@intel.com>
3 Date: Sun, 7 Mar 2010 16:21:39 +0000
4 Subject: net: add __must_check to sk_add_backlog
5
6 From: Zhu Yi <yi.zhu@intel.com>
7
8 [ Upstream commit 4045635318538d3ddd2007720412fdc4b08f6a62 ]
9
10 Add the "__must_check" tag to sk_add_backlog() so that any failure to
11 check and drop packets will be warned about.
12
13 Signed-off-by: Zhu Yi <yi.zhu@intel.com>
14 Signed-off-by: David S. Miller <davem@davemloft.net>
15 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16
17 ---
18 include/net/sock.h | 2 +-
19 1 file changed, 1 insertion(+), 1 deletion(-)
20
21 --- a/include/net/sock.h
22 +++ b/include/net/sock.h
23 @@ -589,7 +589,7 @@ static inline void __sk_add_backlog(stru
24 }
25
26 /* The per-socket spinlock must be held here. */
27 -static inline int sk_add_backlog(struct sock *sk, struct sk_buff *skb)
28 +static inline __must_check int sk_add_backlog(struct sock *sk, struct sk_buff *skb)
29 {
30 if (sk->sk_backlog.len >= max(sk->sk_backlog.limit, sk->sk_rcvbuf << 1))
31 return -ENOBUFS;