]> git.baikalelectronics.ru Git - kernel.git/commitdiff
tun: annotate access to queue->trans_start
authorAntoine Tenart <atenart@kernel.org>
Tue, 12 Apr 2022 13:58:52 +0000 (15:58 +0200)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 14 Apr 2022 06:30:09 +0000 (08:30 +0200)
Commit 579e5f8c5ce2 ("net: annotate accesses to queue->trans_start")
introduced a new helper, txq_trans_cond_update, to update
queue->trans_start using WRITE_ONCE. One snippet in drivers/net/tun.c
was missed, as it was introduced roughly at the same time.

Fixes: 579e5f8c5ce2 ("net: annotate accesses to queue->trans_start")
Cc: Eric Dumazet <edumazet@google.com>
Signed-off-by: Antoine Tenart <atenart@kernel.org>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/r/20220412135852.466386-1-atenart@kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/tun.c

index 276a0e42ca8eaa85a96b366ab56f5abda3ff7a27..dbe4c0a4be2cd626824604e75848b4f9f2859a49 100644 (file)
@@ -1124,7 +1124,7 @@ static netdev_tx_t tun_net_xmit(struct sk_buff *skb, struct net_device *dev)
 
        /* NETIF_F_LLTX requires to do our own update of trans_start */
        queue = netdev_get_tx_queue(dev, txq);
-       queue->trans_start = jiffies;
+       txq_trans_cond_update(queue);
 
        /* Notify and wake up reader process */
        if (tfile->flags & TUN_FASYNC)