]> git.karo-electronics.de Git - karo-tx-linux.git/commit
tcp: avoid a possible divide by zero
authorEric Dumazet <eric.dumazet@gmail.com>
Tue, 7 Dec 2010 12:03:55 +0000 (12:03 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 7 Jan 2011 21:58:25 +0000 (13:58 -0800)
commit90548909f7ff41934b9f719e9331695695cb3988
treee59466c9037a74f0bc8715a04310ad58c88f43dd
parentdea96398b30bf6b5d966a9133d0ad30cd1aa946b
tcp: avoid a possible divide by zero

[ Upstream commit ad9f4f50fe9288bbe65b7dfd76d8820afac6a24c ]

sysctl_tcp_tso_win_divisor might be set to zero while one cpu runs in
tcp_tso_should_defer(). Make sure we dont allow a divide by zero by
reading sysctl_tcp_tso_win_divisor exactly once.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/ipv4/tcp_output.c