From: Jarek Poplawski <jarkao2@gmail.com>
To: David Miller <davem@davemloft.net>, Jeff Garzik <jeff@garzik.org>
Cc: netdev@vger.kernel.org, Herbert Xu <herbert@gondor.apana.org.au>
Subject: [PATCH] pppoe: Add missing sock_put() in pppoe_rcv()
Date: Thu, 30 Oct 2008 08:57:25 +0000 [thread overview]
Message-ID: <20081030085725.GA15289@ff.dom.local> (raw)
pppoe: Add missing sock_put() in pppoe_rcv()
Add missing sock_put() in pppoe_rcv() (introduced by
commit 392fdb0e35055b96faa9c1cd6ab537805337cdce).
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
---
[needed for stables 2.6.26 and later]
drivers/net/pppoe.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/net/pppoe.c b/drivers/net/pppoe.c
index fc6f4b8..c074276 100644
--- a/drivers/net/pppoe.c
+++ b/drivers/net/pppoe.c
@@ -403,8 +403,10 @@ static int pppoe_rcv(struct sk_buff *skb,
if (!po)
goto drop;
- if (pskb_trim_rcsum(skb, len))
+ if (pskb_trim_rcsum(skb, len)) {
+ sock_put(sk_pppox(po));
goto drop;
+ }
return sk_receive_skb(sk_pppox(po), skb, 0);
next reply other threads:[~2008-10-30 8:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-30 8:57 Jarek Poplawski [this message]
2008-10-31 4:26 ` [PATCH] pppoe: Add missing sock_put() in pppoe_rcv() Herbert Xu
2008-10-31 4:29 ` Herbert Xu
2008-10-31 6:11 ` David Miller
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=20081030085725.GA15289@ff.dom.local \
--to=jarkao2@gmail.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=jeff@garzik.org \
--cc=netdev@vger.kernel.org \
/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