]> 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)
committerDavid S. Miller <davem@davemloft.net>
Wed, 24 Aug 2022 12:46:58 +0000 (13:46 +0100)
commit7a234c05647fa0d7cf07258e86d1cd63e8b54540
treededb5016d36856fd34d13fbcfc7d93823b9b8cd9
parent0d687ff07049b52c4701143190ee9644bc3ac4bf
net: Fix a data-race around netdev_budget.

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>
net/core/dev.c