From: David Miller <davem@davemloft.net>
To: eric@regit.org
Cc: netdev@vger.kernel.org
Subject: Re: [RFC PATCH] af_packet: don't to defrag shared skb
Date: Fri, 07 Dec 2012 14:10:55 -0500 (EST) [thread overview]
Message-ID: <20121207.141055.2052060513814647508.davem@davemloft.net> (raw)
In-Reply-To: <1354906561-4695-1-git-send-email-eric@regit.org>
From: Eric Leblond <eric@regit.org>
Date: Fri, 7 Dec 2012 19:56:01 +0100
> This patch is adding a check on skb before trying to defrag the
> packet for the hash computation in fanout mode. The goal of this
> patch is to avoid an kernel crash in pskb_expand_head.
> It appears that under some specific condition there is a shared
> skb reaching the defrag code and this lead to a crash due to the
> following code:
>
> if (skb_shared(skb))
> BUG();
>
> I've observed this crash under the following condition:
> 1. a program is listening to an wifi interface (let say wlan0)
> 2. it is using fanout capture in flow load balancing mode
> 3. defrag option is on on the fanout socket
> 4. the interface disconnect (radio down for example)
> 5. the interface reconnect (radio switched up)
> 6. once reconnected a single packet is seen with skb->users=2
> 7. the kernel crash in pskb_expand_head at skbuff.c:1035
...
> Signed-off-by: Eric Leblond <eric@regit.org>
Thanks Eric. I'll try to figure out if we should instead
change the wireless code to avoid sending shared SKBs into
the input path like that.
next prev parent reply other threads:[~2012-12-07 19:10 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-07 18:56 [RFC PATCH] af_packet: don't to defrag shared skb Eric Leblond
2012-12-07 19:10 ` David Miller [this message]
2012-12-07 20:31 ` David Miller
2012-12-07 20:42 ` Johannes Berg
2012-12-07 20:54 ` Eric Leblond
2012-12-07 21:30 ` Johannes Berg
2012-12-07 21:41 ` Johannes Berg
[not found] ` <1354916502.9124.18.camel-8Nb76shvtaUJvtFkdXX2HixXY32XiHfO@public.gmane.org>
2012-12-07 22:12 ` Johannes Berg
2012-12-07 22:23 ` Johannes Berg
[not found] ` <1354919017.9124.33.camel-8Nb76shvtaUJvtFkdXX2HixXY32XiHfO@public.gmane.org>
2012-12-10 9:29 ` Johannes Berg
2012-12-10 9:41 ` [PATCH] ipv4: ip_check_defrag must not modify skb before unsharing Johannes Berg
2012-12-10 11:02 ` Eric Leblond
2012-12-10 18:41 ` David Miller
2012-12-10 18:45 ` Johannes Berg
[not found] ` <1355165152.8083.4.camel-8Nb76shvtaUJvtFkdXX2HixXY32XiHfO@public.gmane.org>
2012-12-10 18:50 ` David Miller
2012-12-07 21:46 ` [RFC PATCH] af_packet: don't to defrag shared skb Eric Leblond
2012-12-07 21:56 ` Johannes Berg
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=20121207.141055.2052060513814647508.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=eric@regit.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;
as well as URLs for NNTP newsgroup(s).