diff options
author | Eric Dumazet <edumazet@google.com> | 2012-05-19 00:23:00 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-05-19 10:32:30 +0400 |
commit | 968d70184d599abc7fe0a89447ef4e183e0135c4 (patch) | |
tree | 802783219bef73069906164aa4d6b6a67aab9f7d /drivers/net/ppp/pppoe.c | |
parent | a50feda546ac03415707a9bbcac8d6b20714db21 (diff) | |
download | linux-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.c | 6 |
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); |