diff options
author | Tao Liu <[email protected]> | 2021-05-13 21:08:00 +0800 |
---|---|---|
committer | David S. Miller <[email protected]> | 2021-05-13 15:54:59 -0700 |
commit | e4df1b0c24350a0f00229ff895a91f1072bd850d (patch) | |
tree | b9079a80dd57ca9bece8a015442dbc12d1c93864 /tools/perf/scripts/python/syscall-counts-by-pid.py | |
parent | c7d8302478ae645c2e9b59f2cf125641875b7dc2 (diff) |
openvswitch: meter: fix race when getting now_ms.
We have observed meters working unexpected if traffic is 3+Gbit/s
with multiple connections.
now_ms is not pretected by meter->lock, we may get a negative
long_delta_ms when another cpu updated meter->used, then:
delta_ms = (u32)long_delta_ms;
which will be a large value.
band->bucket += delta_ms * band->rate;
then we get a wrong band->bucket.
OpenVswitch userspace datapath has fixed the same issue[1] some
time ago, and we port the implementation to kernel datapath.
[1] https://patchwork.ozlabs.org/project/openvswitch/patch/[email protected]/
Fixes: 96fbc13d7e77 ("openvswitch: Add meter infrastructure")
Signed-off-by: Tao Liu <[email protected]>
Suggested-by: Ilya Maximets <[email protected]>
Reviewed-by: Ilya Maximets <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts-by-pid.py')
0 files changed, 0 insertions, 0 deletions