Subject: Re: [PATCH 1/8] net: add limit for socket backlog

From: Zhu Yi <[email-masked]>
Date: Wed, 03 Mar 2010 15:35:28 +0800

On Wed, 2010-03-03 at 14:54 +0800, Eric Dumazet wrote:
> > diff --git a/include/net/sock.h b/include/net/sock.h
> > index 6cb1676..847119a 100644
> > --- a/include/net/sock.h
> > +++ b/include/net/sock.h
> > @@ -253,6 +253,8 @@ struct sock {
> >  	struct {
> >  		struct sk_buff *head;
> >  		struct sk_buff *tail;
> > +		int len;
> > +		int limit;
> 
> This new limit field is really not needed

sk->sk_rcvbuf can be adjusted by setsockopt from user at run time. The
minimum allowed value is 256. I'm afraid this will break most protocols.

<...>

> Ouch, this patch breaks bisection, since all protocols currently ignore
> -ENOBUFS value and dont free skb
> 
> If you split your work on several patches, you still have to make
> resulting kernels usable.

OK. Will fix.

<...>

> > +	sk->sk_backlog.limit	=	sk->sk_rcvbuf >> 1;

Sorry, typo.

Thanks,
-yi