aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/net/lib/py/utils.py
diff options
context:
space:
mode:
authorEric Dumazet <[email protected]>2024-12-19 15:03:30 +0000
committerJakub Kicinski <[email protected]>2024-12-20 21:04:40 +0000
commit05dd04b218f42c57a14e330fd8583995f141ed6b (patch)
tree3ddeeb723012bd6ebc2fd67c8bf1c38a5d0da269 /tools/testing/selftests/net/lib/py/utils.py
parentMerge branch 'hisilicon-hns-deadcoding' (diff)
downloadkernel-05dd04b218f42c57a14e330fd8583995f141ed6b.tar.gz
kernel-05dd04b218f42c57a14e330fd8583995f141ed6b.zip
inetpeer: avoid false sharing in inet_peer_xrlim_allow()
Under DOS, inet_peer_xrlim_allow() might be called millions of times per second from different cpus. Make sure to write over peer->rate_tokens and peer->rate_last only when really needed. Note the inherent races of this function are still there, we do not care of precise ICMP rate limiting. Signed-off-by: Eric Dumazet <[email protected]> Reviewed-by: Willem de Bruijn <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'tools/testing/selftests/net/lib/py/utils.py')
0 files changed, 0 insertions, 0 deletions