From: Eric Dumazet <eric.dumazet@gmail.com>
To: Diddi Oscarsson <diddi@diddi.se>, David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, Herbert Xu <herbert@gondor.apana.org.au>,
Patrick McHardy <kaber@trash.net>
Subject: Re: VLAN over GRE segfault
Date: Fri, 18 Mar 2011 11:27:27 +0100 [thread overview]
Message-ID: <1300444047.2888.18.camel@edumazet-laptop> (raw)
In-Reply-To: <4D830AF9.8040007@diddi.se>
Le vendredi 18 mars 2011 à 08:34 +0100, Diddi Oscarsson a écrit :
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hello!
>
> I was trying to get ethernet over GRE to work when I found an obvious
> way NOT to do it.
> Basically I created a VLAN interface from the GRE interface (even
> though I had my fair doubts it would work) which gave me a nice segfault.
> The problem with this is that after the segfault, new network
> connections cannot be made (ping, ssh, http, whatever) and a reboot of
> the computer is necessary.
> I think an error message needs to be added when trying an operation
> like this.
>
> My system:
> Linux colalapp 2.6.37-2-amd64 #1 SMP Sun Feb 27 10:12:22 UTC 2011
> x86_64 GNU/Linux
> ip utility, iproute2-ss110107
> Debian unstable
>
> Steps to reproduce:
> ip tunnel add gre0 mode gre
> ip link add link gre0 name vlan1 type vlan id 1
> ip link set vlan1 address 00:15:14:13:12:11
> ip link set gre0 up
> ip link set vlan1 up
> <CRASH>
> Attached in the mail is an output from dmesg right after the segfault.
>
> Regarding ethernet over gre, I've just found out about gretap which
> I'm testing right now.
Hi Diddi
It might be a 2.6.28 regression, after commit c95b819ad7
(gre: Use needed_headroom)
Thanks
[PATCH] vlan: should take into account needed_headroom
Commit c95b819ad7 (gre: Use needed_headroom)
made gre use needed_headroom instead of hard_header_len
This uncover a bug in vlan code.
We should make sure vlan devices take into account their
real_dev->needed_headroom or we risk a crash in ipgre_header(), because
we dont have enough room to push IP header in skb.
Reported-by: Diddi Oscarsson <diddi@diddi.se>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Patrick McHardy <kaber@trash.net>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
---
net/8021q/vlan_dev.c | 1 +
1 files changed, 1 insertion(+)
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index ae610f0..e34ea9e 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -720,6 +720,7 @@ static int vlan_dev_init(struct net_device *dev)
dev->fcoe_ddp_xid = real_dev->fcoe_ddp_xid;
#endif
+ dev->needed_headroom = real_dev->needed_headroom;
if (real_dev->features & NETIF_F_HW_VLAN_TX) {
dev->header_ops = real_dev->header_ops;
dev->hard_header_len = real_dev->hard_header_len;
next prev parent reply other threads:[~2011-03-18 10:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-18 7:34 VLAN over GRE segfault Diddi Oscarsson
2011-03-18 8:26 ` Eric Dumazet
2011-03-18 10:27 ` Eric Dumazet [this message]
2011-03-18 19:28 ` Herbert Xu
2011-03-18 22:16 ` 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=1300444047.2888.18.camel@edumazet-laptop \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=diddi@diddi.se \
--cc=herbert@gondor.apana.org.au \
--cc=kaber@trash.net \
--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