]> 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:18:08 +0000 (17:18 +0200)
commitc49b023e4e2eaa6401fba9fbb87867942ee53276
tree17959461d689d70112d96a3c30092218ffa97044
parent32f8c816b92e5f7d556ca2f7f17082ce8c8286f0
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