]> git.baikalelectronics.ru Git - kernel.git/commit
ipv4: Fix a data-race around sysctl_fib_sync_mem.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Wed, 6 Jul 2022 23:40:03 +0000 (16:40 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 8 Jul 2022 11:10:34 +0000 (12:10 +0100)
commitbc745d73905da4acb846418d9a35a6d032ed9aac
treeab1e05b75bb9090148ce3c2473b9c3c1ccfd1f36
parentae90c421c5d3286b9a4eee867deb3beac67e1e4c
ipv4: Fix a data-race around sysctl_fib_sync_mem.

While reading sysctl_fib_sync_mem, it can be changed concurrently.
So, we need to add READ_ONCE() to avoid a data-race.

Fixes: a4600cdec625 ("ipv4: Allow amount of dirty memory from fib resizing to be controllable")
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/fib_trie.c