]> git.baikalelectronics.ru Git - kernel.git/commit
net: Fix data-races around netdev_tstamp_prequeue.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Tue, 23 Aug 2022 17:46:47 +0000 (10:46 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 5 Sep 2022 08:27:41 +0000 (10:27 +0200)
commitcd3c1c6023428c31b2085a9dae9fda981e5c958d
treea2cd31345a82e9916d5e4981bf15f32ebd9a549a
parent4e2de69318f37df40c8638f4749eeb85d2e88f97
net: Fix data-races around netdev_tstamp_prequeue.

[ Upstream commit 984b41ca7e20ea5062ee099024adcab5a9c1406b ]

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

Fixes: 769c199f0e89 ("net: Consistent skb timestamping")
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