* [RFC PATCH] NFC: st21nfcb: Avoid use of skb after free
@ 2015-01-15 10:30 Anda-Maria Nicolae
2015-01-15 21:33 ` christophe.ricard
0 siblings, 1 reply; 2+ messages in thread
From: Anda-Maria Nicolae @ 2015-01-15 10:30 UTC (permalink / raw)
To: lauro.venancio, aloisio.almeida, sameo, christophe.ricard,
linux-wireless, linux-kernel
Do not insert in send queue the skb that contains unknown Packet Control Byte
Signed-off-by: Anda-Maria Nicolae <anda-maria.nicolae@intel.com>
---
Only compile tested, please have a look
drivers/nfc/st21nfcb/ndlc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nfc/st21nfcb/ndlc.c b/drivers/nfc/st21nfcb/ndlc.c
index bac50e8..72659a3 100644
--- a/drivers/nfc/st21nfcb/ndlc.c
+++ b/drivers/nfc/st21nfcb/ndlc.c
@@ -138,7 +138,7 @@ static void llt_ndlc_requeue_data_pending(struct llt_ndlc *ndlc)
default:
pr_err("UNKNOWN Packet Control Byte=%d\n", pcb);
kfree_skb(skb);
- break;
+ continue;
}
skb_queue_head(&ndlc->send_q, skb);
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [RFC PATCH] NFC: st21nfcb: Avoid use of skb after free
2015-01-15 10:30 [RFC PATCH] NFC: st21nfcb: Avoid use of skb after free Anda-Maria Nicolae
@ 2015-01-15 21:33 ` christophe.ricard
0 siblings, 0 replies; 2+ messages in thread
From: christophe.ricard @ 2015-01-15 21:33 UTC (permalink / raw)
To: Anda-Maria Nicolae, lauro.venancio, aloisio.almeida, sameo,
linux-wireless, linux-kernel
Hi Anda-Maria,
I agree with your fix. I have built and tested it successfully.
I will include it in a new patch series with a:
Acked-by: Christophe Ricard <christophe-h.ricard@st.com>
Thanks a lot.
Christophe
On 15/01/2015 11:30, Anda-Maria Nicolae wrote:
> Do not insert in send queue the skb that contains unknown Packet Control Byte
>
> Signed-off-by: Anda-Maria Nicolae <anda-maria.nicolae@intel.com>
> ---
> Only compile tested, please have a look
>
> drivers/nfc/st21nfcb/ndlc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/nfc/st21nfcb/ndlc.c b/drivers/nfc/st21nfcb/ndlc.c
> index bac50e8..72659a3 100644
> --- a/drivers/nfc/st21nfcb/ndlc.c
> +++ b/drivers/nfc/st21nfcb/ndlc.c
> @@ -138,7 +138,7 @@ static void llt_ndlc_requeue_data_pending(struct llt_ndlc *ndlc)
> default:
> pr_err("UNKNOWN Packet Control Byte=%d\n", pcb);
> kfree_skb(skb);
> - break;
> + continue;
> }
> skb_queue_head(&ndlc->send_q, skb);
> }
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-01-15 21:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-15 10:30 [RFC PATCH] NFC: st21nfcb: Avoid use of skb after free Anda-Maria Nicolae
2015-01-15 21:33 ` christophe.ricard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).