]> git.baikalelectronics.ru Git - kernel.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)
committerDavid S. Miller <davem@davemloft.net>
Wed, 8 Dec 2010 20:34:08 +0000 (12:34 -0800)
commita3e712b35ca8a8469a1e50b9bff941ce54c46263
treef3f3100da8d042607bbbab31c1f8a060ba2b5f15
parent6fd740a9a95f3e78894c3e812fad6f7c5859446a
tcp: avoid a possible divide by zero

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>
net/ipv4/tcp_output.c