From: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: "Salam Noureddine" <noureddine@arista.com>,
"David S. Miller" <davem@davemloft.net>,
"Pali Rohár" <pali.rohar@gmail.com>,
"Network Development" <netdev@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
"Sebastian Reichel" <sre@kernel.org>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>
Subject: Re: [OOPS] In __netif_receive_skb_core
Date: Tue, 12 Jan 2016 09:16:16 +0200 [thread overview]
Message-ID: <5694A840.8030900@gmail.com> (raw)
In-Reply-To: <1452565515.1223.11.camel@edumazet-glaptop2.roam.corp.google.com>
On 12.01.2016 04:25, Eric Dumazet wrote:
> On Mon, 2016-01-11 at 18:21 -0800, Eric Dumazet wrote:
>> On Mon, 2016-01-11 at 17:19 -0800, Salam Noureddine wrote:
>>> It must be that skb->dev was changed to NULL inside of
>>> __netif_receive_skb_core, otherwise we would have crashed much
>>> earlier. Also, orig_dev is saved at the beginning. Possibly a device
>>> is layered on top of the original device.
Exactly (skb->dev was changed to NULL ...). Do you think it makes sense
to put printks in various places in __netif_receive_skb_core to see
after which function call skb->dev turns into NULL?
>
> OK please try this fix :
>
> diff --git a/net/phonet/af_phonet.c b/net/phonet/af_phonet.c
> index 10d42f3220ab..f925753668a7 100644
> --- a/net/phonet/af_phonet.c
> +++ b/net/phonet/af_phonet.c
> @@ -377,6 +377,10 @@ static int phonet_rcv(struct sk_buff *skb, struct net_device *dev,
> struct sockaddr_pn sa;
> u16 len;
>
> + skb = skb_share_check(skb, GFP_ATOMIC);
> + if (!skb)
> + return NET_RX_DROP;
> +
> /* check we have at least a full Phonet header */
> if (!pskb_pull(skb, sizeof(struct phonethdr)))
> goto out;
>
>
That one fixes the oops, though I wonder if your previous patch is
needed (I reverted it before testing the current). Unfortunately I don't
have SIM card around to test GPRS connection with, will do it as soon as
I find one and will report.
Thanks,
Ivo
next prev parent reply other threads:[~2016-01-12 7:16 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-07 17:54 [OOPS] In __netif_receive_skb_core Ivaylo Dimitrov
2016-01-10 17:48 ` Ivaylo Dimitrov
2016-01-10 20:26 ` Eric Dumazet
2016-01-11 21:03 ` Ivaylo Dimitrov
2016-01-11 22:11 ` Salam Noureddine
2016-01-12 0:51 ` Ivaylo Dimitrov
2016-01-12 1:06 ` Eric Dumazet
2016-01-12 1:19 ` Salam Noureddine
2016-01-12 2:21 ` Eric Dumazet
2016-01-12 2:25 ` Eric Dumazet
2016-01-12 7:16 ` Ivaylo Dimitrov [this message]
2016-01-12 14:19 ` Eric Dumazet
2016-01-12 16:58 ` [PATCH net] phonet: properly unshare skbs in phonet_rcv() Eric Dumazet
2016-01-12 20:47 ` David Miller
2016-01-13 12:26 ` Rémi Denis-Courmont
2016-01-13 15:07 ` Eric Dumazet
2016-01-12 18:15 ` [OOPS] In __netif_receive_skb_core Salam Noureddine
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=5694A840.8030900@gmail.com \
--to=ivo.g.dimitrov.75@gmail.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=noureddine@arista.com \
--cc=pali.rohar@gmail.com \
--cc=sre@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;
as well as URLs for NNTP newsgroup(s).