]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 5 Sep 2022 08:27:42 +0000 (10:27 +0200)
commit958f2e8fdbf3e707766d1808ff7d4dfe07f8a7c2
tree18ec262611d7fb50dc988d17aebdba70021c9884
parentceebbd848472a32ea3d7cc54847822e1a7103821
net: Fix a data-race around netdev_budget_usecs.

[ Upstream commit 59f937ddc697f12a78e8b24358547f8cbf847f60 ]

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

Fixes: 74cb56bd48c3 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/core/dev.c