From: "Bin Luo (University of Electronic Science and Technology of China)" <luob87709@gmail.com>
To: oe-linux-nfc@lists.linux.dev
Cc: johan@kernel.org, david@ixit.cz, kuba@kernel.org, netdev@vger.kernel.org
Subject: [PATCH v4 0/2] net/nfc: fix skb ownership and NCI status errors
Date: Thu, 26 Nov 2026 14:39:09 +0800 [thread overview]
Message-ID: <20261126063911.353-1-luob87709@gmail.com> (raw)
Hi,
This v4 series addresses the review findings on the v3 NFC callback
ownership and NCI status-error patches:
Changes in v4:
- Patch 1 (net/nfc/hci/core.c, net/nfc/nci/hci.c): synchronize fragment
purging with fragment reassembly by splicing queued rx_hcp_frags onto
a local sk_buff_head under rx_hcp_frags.lock before walking and
allocating the reassembled skb, preventing concurrent purges from
racing with skb_queue_walk().
- Patch 1 (net/nfc/nci/core.c): handle nonzero err in
nci_nfcc_loopback_cb() by freeing skb and failing the pending NCI
request instead of reporting NCI_STATUS_OK.
- Patch 1 (net/nfc/nci/core.c, net/nfc/nci/ntf.c): free and clear
stale ndev->rx_data_reassembly on NCI data-exchange timeouts and
interface error notifications (serialized on ndev->rx_wq).
- Patch 1 & 2: expand commit messages (including user-visible SO_ERROR
impact in Patch 2), add Fixes: tags covering loopback and NCI timer
paths, and place Fixes:/Cc:/Signed-off-by: in a single trailer block.
Validation:
- Both patches apply cleanly with git am on v7.4-rc1 (6628e7d4c6b2) and
pass full-tree scripts/checkpatch.pl --strict with 0 errors, 0 warnings,
and 0 checks.
- Full x86_64 KASAN + kmemleak bzImage build passed with all modified NFC
drivers built in (NFC, Digital, NCI, HCI/SHDLC, NFC-SIM, virtual NCI,
PN533, PN544, Microread, ST21NFCA), and W=1 compilation of all 13
modified NFC object files produced 0 warnings and 0 errors.
- Real QEMU TCG verification ran 32 NCI 1.0 MIFARE status-error (0x01)
exchanges as euid 65534: unfixed baseline returned SO_ERROR=-240 with
47 kmemleak unreferenced objects; v4 returned SO_ERROR=16 on all 32
iterations with SELFTEST_STATUS=0 and 0 kmemleak / KASAN reports.
- Real PN533/PN544/Microread/ST21NFCA hardware was not exercised.
Best regards,
Bin Luo
Bin Luo (University of Electronic Science and Technology of China) (2):
net/nfc: fix skb ownership on data exchange errors
nfc: preserve NCI data status error codes
drivers/nfc/microread/microread.c | 3 +--
drivers/nfc/pn533/pn533.c | 1 +
drivers/nfc/pn544/pn544.c | 3 +--
drivers/nfc/st21nfca/core.c | 3 +--
drivers/nfc/st21nfca/dep.c | 26 ++++++++++++-------------
include/net/nfc/nfc.h | 5 ++++-
net/nfc/digital_dep.c | 32 ++++++++++++++-----------------
net/nfc/hci/core.c | 27 +++++++++++++++++---------
net/nfc/llcp_core.c | 4 +++-
net/nfc/nci/core.c | 18 +++++++++++++++---
net/nfc/nci/data.c | 8 ++++----
net/nfc/nci/hci.c | 25 ++++++++++++++++--------
net/nfc/nci/ntf.c | 5 ++++-
net/nfc/rawsock.c | 5 ++++-
14 files changed, 102 insertions(+), 63 deletions(-)
base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
next reply other threads:[~2026-11-26 6:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 6:39 Bin Luo (University of Electronic Science and Technology of China) [this message]
2026-11-26 6:39 ` [PATCH v4 1/2] net/nfc: fix skb ownership on data exchange errors Bin Luo (University of Electronic Science and Technology of China)
2026-11-26 6:39 ` [PATCH v4 2/2] nfc: preserve NCI data status error codes Bin Luo (University of Electronic Science and Technology of China)
2026-11-26 6:42 ` [PATCH v4 0/2] net/nfc: fix skb ownership and NCI status errors netdev-bot+sinfo
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=20261126063911.353-1-luob87709@gmail.com \
--to=luob87709@gmail.com \
--cc=david@ixit.cz \
--cc=johan@kernel.org \
--cc=kuba@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