diff options
| author | Eric Dumazet <[email protected]> | 2015-06-11 05:11:17 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2015-06-11 06:28:33 +0000 |
| commit | f9c2ff22bb2df7b8f153afd2a4bea07176bad144 (patch) | |
| tree | 3afd7e841d7d0b785d7e1e8678e5cd2372ca2d14 /net/switchdev/switchdev.c | |
| parent | Merge tag 'mac80211-next-for-davem-2015-06-10' of git://git.kernel.org/pub/sc... (diff) | |
| download | kernel-f9c2ff22bb2df7b8f153afd2a4bea07176bad144.tar.gz kernel-f9c2ff22bb2df7b8f153afd2a4bea07176bad144.zip | |
net: tcp: dctcp_update_alpha() fixes.
dctcp_alpha can be read by from dctcp_get_info() without
synchro, so use WRITE_ONCE() to prevent compiler from using
dctcp_alpha as a temporary variable.
Also, playing with small dctcp_shift_g (like 1), can expose
an overflow with 32bit values shifted 9 times before divide.
Use an u64 field to avoid this problem, and perform the divide
only if acked_bytes_ecn is not zero.
Signed-off-by: Eric Dumazet <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/switchdev/switchdev.c')
0 files changed, 0 insertions, 0 deletions
