From: Anda-Maria Nicolae <anda-maria.nicolae@intel.com>
To: lauro.venancio@openbossa.org, aloisio.almeida@openbossa.org,
sameo@linux.intel.com, christophe.ricard@gmail.com,
linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [RFC PATCH] NFC: st21nfcb: Avoid use of skb after free
Date: Thu, 15 Jan 2015 12:30:57 +0200 [thread overview]
Message-ID: <1421317857-1713-1-git-send-email-anda-maria.nicolae@intel.com> (raw)
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
next reply other threads:[~2015-01-15 10:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-15 10:30 Anda-Maria Nicolae [this message]
2015-01-15 21:33 ` christophe.ricard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1421317857-1713-1-git-send-email-anda-maria.nicolae@intel.com \
--to=anda-maria.nicolae@intel.com \
--cc=aloisio.almeida@openbossa.org \
--cc=christophe.ricard@gmail.com \
--cc=lauro.venancio@openbossa.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=sameo@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®