Netdev List
 help / color / mirror / Atom feed
From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
To: Vadim Fedorenko <vadfed@meta.com>,
	 Vadim Fedorenko <vadim.fedorenko@linux.dev>,
	 Willem de Bruijn <willemdebruijn.kernel@gmail.com>,
	 Andy Lutomirski <luto@amacapital.net>
Cc: Vadim Fedorenko <vadfed@meta.com>,
	 Jakub Kicinski <kuba@kernel.org>,
	 "David S . Miller" <davem@davemloft.net>,
	 Willem de Bruijn <willemb@google.com>,
	 netdev@vger.kernel.org
Subject: Re: [PATCH net v3] net-timestamp: make sk_tskey more predictable in error path
Date: Tue, 13 Feb 2024 09:47:47 -0500	[thread overview]
Message-ID: <65cb81133b8_2220892948a@willemb.c.googlers.com.notmuch> (raw)
In-Reply-To: <20240213110428.1681540-1-vadfed@meta.com>

Vadim Fedorenko wrote:
> When SOF_TIMESTAMPING_OPT_ID is used to ambiguate timestamped datagrams,
> the sk_tskey can become unpredictable in case of any error happened
> during sendmsg(). Move increment later in the code and make decrement of
> sk_tskey in error path. This solution is still racy in case of multiple
> threads doing snedmsg() over the very same socket in parallel, but still
> makes error path much more predictable.
> 
> Fixes: 09c2d251b707 ("net-timestamp: add key to disambiguate concurrent datagrams")
> Reported-by: Andy Lutomirski <luto@amacapital.net>
> Signed-off-by: Vadim Fedorenko <vadfed@meta.com>

Reviewed-by: Willem de Bruijn <willemb@google.com>

  reply	other threads:[~2024-02-13 14:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-13 11:04 [PATCH net v3] net-timestamp: make sk_tskey more predictable in error path Vadim Fedorenko
2024-02-13 14:47 ` Willem de Bruijn [this message]
2024-02-15 11:30 ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=65cb81133b8_2220892948a@willemb.c.googlers.com.notmuch \
    --to=willemdebruijn.kernel@gmail.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=luto@amacapital.net \
    --cc=netdev@vger.kernel.org \
    --cc=vadfed@meta.com \
    --cc=vadim.fedorenko@linux.dev \
    --cc=willemb@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox