From: Simon Horman <horms@kernel.org>
To: Aldo Ariel Panzardo <qwe.aldo@gmail.com>
Cc: david@ixit.cz, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, oe-linux-nfc@lists.linux.dev,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org,
syzbot+ci3c472c63e196fe9e@syzkaller.appspotmail.com,
Sashiko <sashiko-bot@kernel.org>
Subject: Re: [PATCH net v3] nfc: llcp: prevent resource leak on repeated connect after DM
Date: Thu, 1 Oct 2026 12:59:52 +0100 [thread overview]
Message-ID: <20261001115952.GA13925@horms.kernel.org> (raw)
In-Reply-To: <20260928035749.2305913-1-qwe.aldo@gmail.com>
On Mon, Sep 28, 2026 at 12:57:49AM -0300, Aldo Ariel Panzardo wrote:
> A rejected asynchronous connect leaves a local reference, SAP allocation,
> service name and device reference on a closed socket. Release them before
> retrying connect.
>
> The device pointer alone does not prove ownership: bind() puts its
> temporary device reference while retaining the pointer. When device
> teardown closes a bound socket, the retry cleanup would put that device
> again. Clear the pointer when a bound or listening socket becomes closed,
> and after a connected socket's device reference is put. Do the same when
> DM closes a bound or listening socket. A DM rejected connect keeps its
> device reference until the retry cleanup, so retain that put there.
>
> Fixes: d646960f7986 ("NFC: Initial LLCP support")
> Reported-by: Sashiko <sashiko-bot@kernel.org>
> Link: https://ci.syzbot.org/findings/64002827-5231-4183-bfca-0d91bded8543/syz_repro
> Cc: stable@vger.kernel.org
> Signed-off-by: Aldo Ariel Panzardo <qwe.aldo@gmail.com>
> ---
> v3: Clear non-owning or already released device pointers on close, while
> preserving the device put for rejected asynchronous connects.
Hi Aldo,
It looks like an AI-generated review of v2 of this patchset was
posted not long after you posted v3. And that review does seem
to raise issues that warrant a response:
- Re: [PATCH net v2] nfc: llcp: prevent resource leak on repeated connect after DM
https://lore.kernel.org/all/179058922656.3145.17540746696102333949@kernel.org/
Also, please do not post updated patches as responses to earlier revisions.
Rather, please start a new email thread for each new revision.
Thanks!
next prev parent reply other threads:[~2026-10-01 11:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-25 18:48 [PATCH net v2] " Aldo Ariel Panzardo
2026-09-27 22:32 ` [syzbot ci] " syzbot ci
2026-09-28 3:57 ` [PATCH net v3] " Aldo Ariel Panzardo
2026-10-01 11:59 ` Simon Horman [this message]
2026-09-28 9:53 ` [PATCH net v2] " netdev-bot+sashiko
2026-10-01 13:28 ` Aldo Ariel Panzardo
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=20261001115952.GA13925@horms.kernel.org \
--to=horms@kernel.org \
--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 \
--cc=qwe.aldo@gmail.com \
--cc=sashiko-bot@kernel.org \
--cc=stable@vger.kernel.org \
--cc=syzbot+ci3c472c63e196fe9e@syzkaller.appspotmail.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®