summaryrefslogtreecommitdiff
path: root/drivers/net/ppp/pppoe.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2012-05-19 00:23:00 +0400
committerDavid S. Miller <davem@davemloft.net>2012-05-19 10:32:30 +0400
commit968d70184d599abc7fe0a89447ef4e183e0135c4 (patch)
tree802783219bef73069906164aa4d6b6a67aab9f7d /drivers/net/ppp/pppoe.c
parenta50feda546ac03415707a9bbcac8d6b20714db21 (diff)
downloadlinux-968d70184d599abc7fe0a89447ef4e183e0135c4.tar.xz
ppp: avoid false drop_monitor false positives
Call consume_skb() in place of kfree_skb() were appropriate. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ppp/pppoe.c')
-rw-r--r--drivers/net/ppp/pppoe.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/ppp/pppoe.c b/drivers/net/ppp/pppoe.c
index dd15b8f8aa0c..cbf7047decc0 100644
--- a/drivers/net/ppp/pppoe.c
+++ b/drivers/net/ppp/pppoe.c
@@ -984,8 +984,10 @@ static int pppoe_recvmsg(struct kiocb *iocb, struct socket *sock,
if (skb) {
total_len = min_t(size_t, total_len, skb->len);
error = skb_copy_datagram_iovec(skb, 0, m->msg_iov, total_len);
- if (error == 0)
- error = total_len;
+ if (error == 0) {
+ consume_skb(skb);
+ return total_len;
+ }
}
kfree_skb(skb);