mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dmitry Safonov <dima@arista.com>
To: Julia Lawall <julia.lawall@inria.fr>,
	linux-kernel@vger.kernel.org, kbuild-all@lists.01.org
Cc: Eric Dumazet <edumazet@google.com>,
	"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH 10/31] net/tcp: Calculate TCP-AO traffic keys (fwd)
Date: Mon, 29 Aug 2022 19:22:18 +0100	[thread overview]
Message-ID: <3efdb052-d95f-9093-e6db-02548dcc5126@arista.com> (raw)
In-Reply-To: <alpine.DEB.2.22.394.2208271630440.6645@hadrien>

On 8/27/22 15:31, Julia Lawall wrote:
> Please check the kfree on lie 332.

Hmm, I don't see anything criminal here, but I can do for version 2:

:--- a/net/ipv4/tcp_ao.c
:+++ b/net/ipv4/tcp_ao.c
:@@ -939,8 +939,8 @@ void tcp_ao_connect_init(struct sock *sk)
:                ao_info->snd_sne_seq = tp->write_seq;
:        } else {
:                WARN_ON_ONCE(1);
:-               kfree(tp->ao_info);
:                rcu_assign_pointer(tp->ao_info, NULL);
:+               kfree(ao_info);
:        }
: }

just to make static analyzer happy. This part of the code is anyway
under WARN_ON_ONCE(), so it's not something that actually runs (as long
as the code is consistent, it's only error-path to free memory if some
code checks become broken in future, to avoid leaks even than).

Thanks,
          Dmitry

      reply	other threads:[~2022-08-29 18:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-27 14:31 Julia Lawall
2022-08-29 18:22 ` Dmitry Safonov [this message]

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=3efdb052-d95f-9093-e6db-02548dcc5126@arista.com \
    --to=dima@arista.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=julia.lawall@inria.fr \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®