]> git.kernelconcepts.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)
committerAK <andi@firstfloor.org>
Sun, 6 Feb 2011 19:03:34 +0000 (11:03 -0800)
commitd98450d683e13c6af7b5219af44cea2671dc07ea
tree1f4f0de2fae5814a3719d5becd52fe12d4d0af3a
parent9a4b8e0c3674f6506c5a2b3c7ac5ea37e297c0a0
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>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
net/ipv4/tcp_output.c