All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@linux-foundation.org>
To: shanwei <shanwei@cn.fujitsu.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org,
	Sam Jansen <sjansen@google.com>
Subject: Re: [PATCH] TCP:Fix a bug in strategy_allowed_congestion_control
Date: Fri, 25 Jan 2008 08:25:53 -0800	[thread overview]
Message-ID: <20080125082553.78e1d207@deepthought> (raw)
In-Reply-To: <47998B55.1030305@cn.fujitsu.com>

On Fri, 25 Jan 2008 15:10:13 +0800
shanwei <shanwei@cn.fujitsu.com> wrote:

> hi all:
> 
> In strategy_allowed_congestion_control of the 2.6.24 kernel, 
> when sysctl_string return 1 on success,it should call 
> tcp_set_allowed_congestion_control to set the allowed congestion
> control.But, it don't.
> the sysctl_string return 1 on success, otherwise return negative,
> never return 0.The patch fix the problem.
> 
> Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
> 
> diff -Nuarp linux-2.6.24/net/ipv4/sysctl_net_ipv4.c linux-2.6.24-new/net/ipv4/sysctl_net_ipv4.c
> --- linux-2.6.24/net/ipv4/sysctl_net_ipv4.c	2008-01-25 06:58:37.000000000 +0800
> +++ linux-2.6.24-new/net/ipv4/sysctl_net_ipv4.c	2008-01-25 12:23:20.000000000 +0800
> @@ -248,7 +248,7 @@ static int strategy_allowed_congestion_c
>  
>  	tcp_get_available_congestion_control(tbl.data, tbl.maxlen);
>  	ret = sysctl_string(&tbl, name, nlen, oldval, oldlenp, newval, newlen);
> -	if (ret == 0 && newval && newlen)
> +	if (ret == 1 && newval && newlen)
>  		ret = tcp_set_allowed_congestion_control(tbl.data);
>  	kfree(tbl.data);
> 
> 

Acked-by: Stephen Hemminger <shemminger@vyatta.com>

This parallels previous fix by Sam Jansen.

       reply	other threads:[~2008-01-25 16:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <47998B55.1030305@cn.fujitsu.com>
2008-01-25 16:25 ` Stephen Hemminger [this message]
2008-01-28  2:05   ` [PATCH] TCP:Fix a bug in strategy_allowed_congestion_control shanwei
2008-02-01  0:47     ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080125082553.78e1d207@deepthought \
    --to=shemminger@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=shanwei@cn.fujitsu.com \
    --cc=sjansen@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.