]> git.baikalelectronics.ru Git - kernel.git/commit
net: Fix a data-race around netdev_budget.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Tue, 23 Aug 2022 17:46:53 +0000 (10:46 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 5 Sep 2022 08:27:42 +0000 (10:27 +0200)
commitceebbd848472a32ea3d7cc54847822e1a7103821
tree7fc8fd5f38ba49dc080616c137837ff1fdc2a285
parent88586db3072096c47c83903b948db9763505af16
net: Fix a data-race around netdev_budget.

[ Upstream commit 7a234c05647fa0d7cf07258e86d1cd63e8b54540 ]

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

Fixes: 983507ab3bc6 ("[NET]: Separate two usages of netdev_max_backlog.")
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