diff mbox series

[net] tun: annotate access to queue->trans_start

Message ID 20220412135852.466386-1-atenart@kernel.org (mailing list archive)
State Accepted
Commit 968a1a5d6541cd24e37dadc1926eab9c10aeb09b
Delegated to: Netdev Maintainers
Headers show
Series [net] tun: annotate access to queue->trans_start | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net
netdev/fixes_present success Fixes tag present in non-next series
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers success CCed 5 of 5 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Antoine Tenart April 12, 2022, 1:58 p.m. UTC
Commit 5337824f4dc4 ("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: 5337824f4dc4 ("net: annotate accesses to queue->trans_start")
Cc: Eric Dumazet <edumazet@google.com>
Signed-off-by: Antoine Tenart <atenart@kernel.org>
---
 drivers/net/tun.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Eric Dumazet April 13, 2022, 9:05 p.m. UTC | #1
On Tue, Apr 12, 2022 at 6:59 AM Antoine Tenart <atenart@kernel.org> wrote:
>
> Commit 5337824f4dc4 ("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.
>

LGTM, thanks.
Reviewed-by: Eric Dumazet <edumazet@google.com>
patchwork-bot+netdevbpf@kernel.org April 14, 2022, 6:50 a.m. UTC | #2
Hello:

This patch was applied to netdev/net.git (master)
by Paolo Abeni <pabeni@redhat.com>:

On Tue, 12 Apr 2022 15:58:52 +0200 you wrote:
> Commit 5337824f4dc4 ("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: 5337824f4dc4 ("net: annotate accesses to queue->trans_start")
> Cc: Eric Dumazet <edumazet@google.com>
> Signed-off-by: Antoine Tenart <atenart@kernel.org>
> 
> [...]

Here is the summary with links:
  - [net] tun: annotate access to queue->trans_start
    https://git.kernel.org/netdev/net/c/968a1a5d6541

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 276a0e42ca8e..dbe4c0a4be2c 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -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)