From: Weongyo Jeong <weongyo.linux@gmail.com>
To: netdev@vger.kernel.org
Cc: Weongyo Jeong <weongyo.linux@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Willem de Bruijn <willemb@google.com>
Subject: [PATCH] packet: uses kfree_skb() for drop.
Date: Wed, 6 Apr 2016 09:54:46 -0700 [thread overview]
Message-ID: <1459961686-14281-1-git-send-email-weongyo.linux@gmail.com> (raw)
consume_skb() isn't for drop or error cases. kfree_skb() is more proper
one.
Signed-off-by: Weongyo Jeong <weongyo.linux@gmail.com>
---
net/packet/af_packet.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index 1ecfa71..a75d5bf 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -2141,7 +2141,7 @@ drop_n_restore:
skb->len = skb_len;
}
drop:
- consume_skb(skb);
+ kfree_skb(skb);
return 0;
}
--
2.1.3
next reply other threads:[~2016-04-06 16:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-06 16:54 Weongyo Jeong [this message]
2016-04-06 17:27 ` [PATCH] packet: uses kfree_skb() for drop Willem de Bruijn
2016-04-06 18:10 ` Weongyo Jeong
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=1459961686-14281-1-git-send-email-weongyo.linux@gmail.com \
--to=weongyo.linux@gmail.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=willemb@google.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;
as well as URLs for NNTP newsgroup(s).