[patch 10/38] TCP: Fix a bug in strategy_allowed_congestion_control

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Greg KH
Date: Friday, February 22, 2008 - 5:30 pm

2.6.24-stable review patch.  If anyone has any objections, please let us
know.

------------------
 
 Upstream commit: 16ca3f913001efdb6171a2781ef41c77474e3895

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>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 net/ipv4/sysctl_net_ipv4.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/net/ipv4/sysctl_net_ipv4.c
+++ b/net/ipv4/sysctl_net_ipv4.c
@@ -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);
 

-- 
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch 00/38] 2.6.24-stable review, Greg KH, (Fri Feb 22, 5:29 pm)
[patch 08/38] Fix dl2k constants, Greg KH, (Fri Feb 22, 5:30 pm)
[patch 10/38] TCP: Fix a bug in strategy_allowed_congestio ..., Greg KH, (Fri Feb 22, 5:30 pm)
[patch 11/38] TC: oops in em_meta, Greg KH, (Fri Feb 22, 5:30 pm)
[patch 32/38] USB: fix pm counter leak in usblp, Greg KH, (Fri Feb 22, 5:31 pm)
[patch 33/38] SCSI: gdth: scan for scsi devices, Greg KH, (Fri Feb 22, 5:31 pm)
Re: [patch 34/38] kbuild: allow -fstack-protector to take ..., Arjan van de Ven, (Fri Feb 22, 5:46 pm)
Re: [patch 33/38] SCSI: gdth: scan for scsi devices, Boaz Harrosh, (Fri Feb 22, 8:02 pm)
Re: [patch 33/38] SCSI: gdth: scan for scsi devices, James Bottomley, (Fri Feb 22, 9:15 pm)
Re: [patch 00/38] 2.6.24-stable review, Chuck Ebbert, (Sat Feb 23, 9:56 am)
Re: [patch 00/38] 2.6.24-stable review, Uli Luckas, (Sun Feb 24, 7:55 am)