Re: [PATCH net v2 3/3] nfc: digital: stop works and drain commands before nfc_remove_device()

From: bin luo

Date: Sun Dec 06 2026 - 05:50:15 EST


Thank you for the detailed review.

The Medium issues in Patch 2/3 and Patch 3/3 are legitimate and I will
respin v3 to address them along with the Low-severity fixes:

1. In Patch 2/3 (nfcsim): I will keep dev->up = false after
nfc_digital_unregister_device() so in-flight digital_wq_cmd() requests
are not silently dropped without invoking cmd_cb(), and I will update
nfcsim_link_recv_skb() to also wake on READ_ONCE(link->shutdown) so
disable_work_sync(&dev->recv_work) cannot stall for a full receive
timeout.

2. In Patch 3/3 (digital): I will update the drain loop in
nfc_digital_unregister_device() to free cmd->req when !cmd->pending
and cmd->resp when !IS_ERR_OR_NULL(cmd->resp), clarify the commit
message regarding the in-flight cmd_complete_work UAF vs. defensive
drain reordering, and fix the first Fixes tag to 59ee2361c924.

3. In Patch 1/3 (llcp) and across the series: I will update the first
Fixes tag to d646960f7986 and fix the From:/Signed-off-by: author
metadata.

4. The pre-existing issues noted in port100, pn533, and pending_sdreqs
locking are valuable findings and will be investigated separately as
follow-up fixes.

pw-bot: cr