From: Andrej Ota <andrej@ota.si>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: <linux-kernel@vger.kernel.org>, <gvs@zemos.net>,
Rami Rosen <ramirose@gmail.com>, netdev <netdev@vger.kernel.org>
Subject: Re: unable to handle kernel NULL pointer dereference in skb_dequeue
Date: Fri, 03 Dec 2010 15:37:18 +0100 [thread overview]
Message-ID: <aa43945b38cee751a8231084866b074d@192.168.253.23> (raw)
In-Reply-To: <1291381791.2897.250.camel@edumazet-laptop>
>> Patch that works for me is below. Now I only hope I haven't
>> (re)introduced a memory leak...
> Problem comes from commit 55c95e738da85 (fix return value of
> __pppoe_xmit() method)
>
> I am not sure patch is OK
Me neither. That's why I wrote "works for me". All I dare say is that it
works better than current code and is probably no worse than it was before
above mentioned commit. Apart from that, there is no point in having return
value for __pppoe_xmit if return value isn't needed.
Easiest way of triggering this BUG is by terminating PPPoE on the server
side, which then hits "if (!dev) { goto abort; }". This in turn calls
"kfree_skb(skb); return 0;" which returns to pppoe_rcv_core which then
goto-s to "abort_put" which again calls "kfree_skb(skb)". Voila the bug.
I don't know how to trigger "if (skb_cow_head(skb, ..." to see if I have
just caused another BUG. However, if I read file comments at the top, I see
a comment from 19/07/01 stating that I have to delete original skb if code
succeeds and never delete it on failure. About the skb copy mentioned in
the same comment, I don't know. 2001 was many commits ago.
Andrej Ota.
next prev parent reply other threads:[~2010-12-03 14:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-03 12:42 Toshio
2010-12-03 13:09 ` Eric Dumazet
2010-12-03 14:37 ` Andrej Ota [this message]
2010-12-03 14:46 ` Eric Dumazet
2010-12-03 22:07 ` Jarek Poplawski
2010-12-03 22:16 ` Denys Fedoryshchenko
2010-12-10 19:51 ` Denys Fedoryshchenko
2010-12-10 20:18 ` David Miller
2010-12-10 21:30 ` Jarek Poplawski
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=aa43945b38cee751a8231084866b074d@192.168.253.23 \
--to=andrej@ota.si \
--cc=eric.dumazet@gmail.com \
--cc=gvs@zemos.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=ramirose@gmail.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®