lkml.org 
[lkml]   [2010]   [Mar]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[129/156] net: add __must_check to sk_add_backlog
    2.6.33-stable review patch.  If anyone has any objections, please let us know.

    ------------------

    From: Zhu Yi <yi.zhu@intel.com>

    [ 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 | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- a/include/net/sock.h
    +++ b/include/net/sock.h
    @@ -589,7 +589,7 @@ static inline void __sk_add_backlog(stru
    }

    /* 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;



    \
     
     \ /
      Last update: 2010-03-31 01:33    [W:4.908 / U:0.212 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site