Netdev List
 help / color / mirror / Atom feed
* [PATCH v4 0/2] net/nfc: fix skb ownership and NCI status errors
@ 2026-11-26  6:39 Bin Luo (University of Electronic Science and Technology of China)
  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)
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Bin Luo (University of Electronic Science and Technology of China) @ 2026-11-26  6:39 UTC (permalink / raw)
  To: oe-linux-nfc; +Cc: johan, david, kuba, netdev

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-11-26  6:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-26  6:39 [PATCH v4 0/2] net/nfc: fix skb ownership and NCI status errors Bin Luo (University of Electronic Science and Technology of China)
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox