diff options
author | Jason Xing | 2024-03-04 16:20:35 +0800 |
---|---|---|
committer | Paolo Abeni | 2024-03-07 10:36:58 +0100 |
commit | 958d6145a6d9ba9e075c921aead8753fb91c9101 (patch) | |
tree | f4c1221797eaad09a98d94b12e3a771c9ccd9ab4 /net/netrom | |
parent | 811b3f9b2ab529d1b9605290c2231be7f447d59b (diff) |
netrom: Fix a data-race around sysctl_netrom_default_path_quality
We need to protect the reader reading sysctl_netrom_default_path_quality
because the value can be changed concurrently.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Jason Xing <kernelxing@tencent.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'net/netrom')
-rw-r--r-- | net/netrom/nr_route.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netrom/nr_route.c b/net/netrom/nr_route.c index baea3cbd76ca..6f709fdffc11 100644 --- a/net/netrom/nr_route.c +++ b/net/netrom/nr_route.c @@ -153,7 +153,7 @@ static int __must_check nr_add_node(ax25_address *nr, const char *mnemonic, nr_neigh->digipeat = NULL; nr_neigh->ax25 = NULL; nr_neigh->dev = dev; - nr_neigh->quality = sysctl_netrom_default_path_quality; + nr_neigh->quality = READ_ONCE(sysctl_netrom_default_path_quality); nr_neigh->locked = 0; nr_neigh->count = 0; nr_neigh->number = nr_neigh_no++; |