]> git.ipfire.org Git - thirdparty/kernel/stable.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>
Wed, 31 Aug 2022 15:15:19 +0000 (17:15 +0200)
commite73009ebc1233e447ae6503da51c402e4ed7ca4b
tree6862f9fffcf9106921dc06df20f64c197179c346
parent3850060352f41366bdc25b091baeeb5c144b4a9e
net: Fix data-races around netdev_tstamp_prequeue.

[ Upstream commit 61adf447e38664447526698872e21c04623afb8e ]

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

Fixes: 3b098e2d7c69 ("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