net: Fix a data-race around netdev_budget_usecs.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Tue, 23 Aug 2022 17:46:55 +0000 (10:46 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 24 Aug 2022 12:46:58 +0000 (13:46 +0100)
commitfa45d484c52c73f79db2c23b0cdfc6c6455093ad
treefa4046a28fd1b138945ad4e81880029d5b22a793
parent657b991afb89d25fe6c4783b1b75a8ad4563670d
net: Fix a data-race around netdev_budget_usecs.

While reading netdev_budget_usecs, it can be changed concurrently.
Thus, we need to add READ_ONCE() to its reader.

Fixes: 7acf8a1e8a28 ("Replace 2 jiffies with sysctl netdev_budget_usecs to enable softirq tuning")
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/dev.c