net: Fix data-races around netdev_max_backlog.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Tue, 23 Aug 2022 17:46:46 +0000 (10:46 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 31 Aug 2022 15:16:42 +0000 (17:16 +0200)
commit4d2c808d098316e4b6eebf27064593325ac00031
tree5197f6bc7e42ed9867322fe0b18f9ea41fcc40ea
parent572d4cdf907fa854f726661ed80bb13e199b311e
net: Fix data-races around netdev_max_backlog.

[ Upstream commit 5dcd08cd19912892586c6082d56718333e2d19db ]

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

While at it, we remove the unnecessary spaces in the doc.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
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>
Documentation/admin-guide/sysctl/net.rst
net/core/dev.c
net/core/gro_cells.c
net/xfrm/espintcp.c
net/xfrm/xfrm_input.c