From: Christophe Ricard Date: Fri, 14 Aug 2015 20:33:35 +0000 (+0200) Subject: nfc: st-nci: Remove data from ack_pending_q when receiving a SYNC_ACK X-Git-Tag: v4.2.2~128 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=27c9e18257756f81c25143120ed952d3ab6ee780;p=thirdparty%2Fkernel%2Fstable.git nfc: st-nci: Remove data from ack_pending_q when receiving a SYNC_ACK commit 1d816b6eb513498aa28a0ff1e4db7632bded1707 upstream. When receiving a NDLC PCB_SYNC_ACK the pending data was never removed from ack_pending_q and cleared. Signed-off-by: Christophe Ricard Signed-off-by: Samuel Ortiz Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/nfc/st-nci/ndlc.c b/drivers/nfc/st-nci/ndlc.c index 56c6a4cb4c961..bb08b16f45cfe 100644 --- a/drivers/nfc/st-nci/ndlc.c +++ b/drivers/nfc/st-nci/ndlc.c @@ -171,6 +171,8 @@ static void llt_ndlc_rcv_queue(struct llt_ndlc *ndlc) if ((pcb & PCB_TYPE_MASK) == PCB_TYPE_SUPERVISOR) { switch (pcb & PCB_SYNC_MASK) { case PCB_SYNC_ACK: + skb = skb_dequeue(&ndlc->ack_pending_q); + kfree_skb(skb); del_timer_sync(&ndlc->t1_timer); del_timer_sync(&ndlc->t2_timer); ndlc->t2_active = false;