summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorVadim Fedorenko <vadfed@meta.com>2024-02-13 03:04:28 -0800
committerPaolo Abeni <pabeni@redhat.com>2024-02-15 12:04:04 +0100
commit488b6d91b07112eaaaa4454332c1480894d4e06e (patch)
tree3dc7052af956c4df9e8de2353d41061a11c8d619 /drivers
parent2ec197fda25f57afccac7f2846e509471488614c (diff)
net-timestamp: make sk_tskey more predictable in error path
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> Link: https://lore.kernel.org/r/20240213110428.1681540-1-vadfed@meta.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'drivers')
0 files changed, 0 insertions, 0 deletions