Skip to content

Commit 4a52ec2

Browse files
Xu Raogregkh
authored andcommitted
nfc: pn533: purge fragmented skbs during cleanup
commit 5718fc6 upstream. pn53x_common_clean() purges resp_q before freeing the common PN533 state, but it leaves fragment_skb untouched. The fragmentation helpers queue transmit fragments there while sending large initiator or target-mode frames, and those skbs remain owned by the driver until they are sent or discarded. If the device is removed while fragments are still queued, the common cleanup path frees the PN533 state without releasing the queued fragment skbs, leaking them. Purge fragment_skb during cleanup alongside resp_q. Fixes: 963a82e ("NFC: pn533: Split large Tx frames in chunks") Cc: stable@vger.kernel.org Signed-off-by: Xu Rao <raoxu@uniontech.com> Link: https://patch.msgid.link/2D896607CAE4408E+20260720021444.3362044-1-raoxu@uniontech.com Signed-off-by: David Heidelberg <david@ixit.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 3793d76 commit 4a52ec2

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/nfc/pn533/pn533.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2803,6 +2803,7 @@ void pn53x_common_clean(struct pn533 *priv)
28032803
destroy_workqueue(priv->wq);
28042804

28052805
skb_queue_purge(&priv->resp_q);
2806+
skb_queue_purge(&priv->fragment_skb);
28062807

28072808
list_for_each_entry_safe(cmd, n, &priv->cmd_queue, queue) {
28082809
list_del(&cmd->queue);

0 commit comments

Comments
 (0)