diff options
author | 2022-08-23 10:46:45 -0700 | |
---|---|---|
committer | 2022-08-24 13:46:57 +0100 | |
commit | bf955b5ab8f6f7b0632cdef8e36b14e4f6e77829 (patch) | |
tree | 45d85660cd5cbaa68bdd7e11b9290fdf6d98fc9e /lib/mpi/mpi-sub-ui.c | |
parent | net: Fix data-races around sysctl_[rw]mem_(max|default). (diff) | |
download | wireguard-linux-bf955b5ab8f6f7b0632cdef8e36b14e4f6e77829.tar.xz wireguard-linux-bf955b5ab8f6f7b0632cdef8e36b14e4f6e77829.zip |
net: Fix data-races around weight_p and dev_weight_[rt]x_bias.
While reading weight_p, it can be changed concurrently. Thus, we need
to add READ_ONCE() to its reader.
Also, dev_[rt]x_weight can be read/written at the same time. So, we
need to use READ_ONCE() and WRITE_ONCE() for its access. Moreover, to
use the same weight_p while changing dev_[rt]x_weight, we add a mutex
in proc_do_dev_weight().
Fixes: 3d48b53fb2ae ("net: dev_weight: TX/RX orthogonality")
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'lib/mpi/mpi-sub-ui.c')
0 files changed, 0 insertions, 0 deletions