From: Shubham Antil <shubham@octane.security>
To: netdev@vger.kernel.org
Cc: Simon Horman <horms@kernel.org>,
gio@octane.security, David Heidelberg <david@ixit.cz>,
oe-linux-nfc@lists.linux.dev
Subject: [PATCH net v9 0/3] nfc: nfcmrvl: split firmware teardown fixes
Date: Mon, 30 Nov 2026 18:32:37 +0530 [thread overview]
Message-ID: <20261130130240.65411-1-shubham@octane.security> (raw)
The v8 series combined the firmware teardown fix with unrelated UART work.
This standalone submission applies directly to the base below and divides
the change into core infrastructure, firmware worker synchronization, and
the nfcmrvl unregister hook.
The first patch adds the NCI pre-unregister shutdown stage and a terminal
command-drain helper. It prevents a close-time response from scheduling
command work after that drain. The second patch serializes Marvell
firmware completion, timeout, and receive work. The final patch invokes
the abort while the NCI workqueues are still alive.
The issue was found during an AI-assisted source audit using OpenAI Codex,
gpt-5.6-sol. The active-download detach condition was reproduced at runtime
by starting a firmware download and removing the N_NCI line discipline.
One hundred immediate detach iterations and timed completion-boundary modes
were exercised. No production incident or pre-fix sanitizer report was
captured. Patch development and test planning used the same assistant.
Each mail patch was applied independently to the base below on the Linux
test host. The affected NFC objects built after every patch with W=1 and
sparse. A KASAN, UBSAN, and lockdep kernel completed 100 immediate
firmware-download detach iterations and the timed completion modes without
a diagnostic, failure, or remaining device. No physical Marvell
controller was available.
Changes since v8:
- make firmware teardown a standalone submission on the original base
- split NCI infrastructure, firmware synchronization, and driver hookup
- drain late responses before the command work and timer are cancelled
- leave overlapping-download admission to its independent patch set
- correct the command-drain helper name in the changelog
- remove an obsolete write-only completion marker
- add the requested AI-assistance trailer
Shubham Antil (3):
nfc: nci: add a pre-unregister shutdown stage
nfc: nfcmrvl: serialize firmware completion and teardown
nfc: nfcmrvl: abort firmware work before unregistering
drivers/nfc/nfcmrvl/fw_dnld.c | 231 ++++++++++++++++++++++++++++++------------
drivers/nfc/nfcmrvl/fw_dnld.h | 10 ++
drivers/nfc/nfcmrvl/main.c | 10 +-
include/net/nfc/nci_core.h | 9 ++
net/nfc/nci/core.c | 31 ++++--
net/nfc/nci/rsp.c | 3 +
6 files changed, 222 insertions(+), 72 deletions(-)
base-commit: 30c71476d842b094651bd7712f6c8ee8716147d0
--
2.54.0
next reply other threads:[~2026-11-30 13:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-30 13:02 Shubham Antil [this message]
2026-11-30 13:02 ` [PATCH net v9 1/3] nfc: nci: add a pre-unregister shutdown stage Shubham Antil
2026-11-30 13:02 ` [PATCH net v9 2/3] nfc: nfcmrvl: serialize firmware completion and teardown Shubham Antil
2026-11-30 13:02 ` [PATCH net v9 3/3] nfc: nfcmrvl: abort firmware work before unregistering Shubham Antil
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=20261130130240.65411-1-shubham@octane.security \
--to=shubham@octane.security \
--cc=david@ixit.cz \
--cc=gio@octane.security \
--cc=horms@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=oe-linux-nfc@lists.linux.dev \
/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