mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Cong Nguyen <congnt264@gmail.com>
Cc: David Heidelberg <david@ixit.cz>,
	"David S . Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	oe-linux-nfc@lists.linux.dev, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] nfc: llcp: fix sdreq TLV list leak on parse/alloc/send failure
Date: Thu, 17 Sep 2026 09:33:15 +0100	[thread overview]
Message-ID: <20260917083315.GX51261@horms.kernel.org> (raw)
In-Reply-To: <20260914121129.2098606-1-congnt264@gmail.com>

On Mon, Sep 14, 2026 at 07:11:29PM +0700, Cong Nguyen wrote:
> nfc_genl_llc_sdreq() builds a list of TLV nodes while walking nested
> netlink attrs, but 3 error paths (nested-attr parse failure, TLV alloc
> ENOMEM, nfc_llcp_send_snl_sdreq() failure) all skip freeing what was
> already queued.
> 
> Route them through a new free_list label, mirroring the SDRES path in
> the same file which already does this. Harmless on the success path
> too -- send_snl_sdreq() drains the list as it moves nodes, so it's
> already empty by the time free_list runs.
> 
> Fixes: d9b8d8e19b07 ("NFC: llcp: Service Name Lookup netlink interface")
> Assisted-by: Claude:claude-opus-4
> Signed-off-by: Cong Nguyen <congnt264@gmail.com>

Reviewed-by: Simon Horman <horms@kernel.org>


      reply	other threads:[~2026-09-17  8:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-14 12:11 Cong Nguyen
2026-09-17  8:33 ` Simon Horman [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=20260917083315.GX51261@horms.kernel.org \
    --to=horms@kernel.org \
    --cc=congnt264@gmail.com \
    --cc=davem@davemloft.net \
    --cc=david@ixit.cz \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=oe-linux-nfc@lists.linux.dev \
    --cc=pabeni@redhat.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

all inboxes | Powered by JetHome®