diff options
author | 2021-12-02 11:44:56 -0800 | |
---|---|---|
committer | 2021-12-02 11:44:56 -0800 | |
commit | fc993be36f9ea7fc286d84d8471a1a20e871aad4 (patch) | |
tree | cef440a299ed7d1c2418992f7d724b4d86e6d83b /net/core/dev.c | |
parent | selftests: net: remove meaningless help option (diff) | |
parent | Merge tag 'net-5.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net (diff) | |
download | wireguard-linux-fc993be36f9ea7fc286d84d8471a1a20e871aad4.tar.xz wireguard-linux-fc993be36f9ea7fc286d84d8471a1a20e871aad4.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/core/dev.c')
-rw-r--r-- | net/core/dev.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index d30adecc2bb2..aba8acc1238c 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -4093,7 +4093,10 @@ static int __dev_queue_xmit(struct sk_buff *skb, struct net_device *sb_dev) if (dev->flags & IFF_UP) { int cpu = smp_processor_id(); /* ok because BHs are off */ - if (txq->xmit_lock_owner != cpu) { + /* Other cpus might concurrently change txq->xmit_lock_owner + * to -1 or to their cpu id, but not to our id. + */ + if (READ_ONCE(txq->xmit_lock_owner) != cpu) { if (dev_xmit_recursion()) goto recursion_alert; |