mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 04:04:43 +01:00
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: 1da177e4c3 ("Linux-2.6.12-rc2")
Signed-off-by: Jason Xing <kernelxing@tencent.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
parent
811b3f9b2a
commit
958d6145a6
1 changed files with 1 additions and 1 deletions
|
|
@ -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++;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue