netdev
[Top] [All Lists]

Re: kernel BUG at net/ipv6/exthdrs_core.c:80!

To: YOSHIFUJI Hideaki / ???? <yoshfuji@xxxxxxxxxxxxxx>
Subject: Re: kernel BUG at net/ipv6/exthdrs_core.c:80!
From: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 23 Apr 2005 00:19:50 +1000
Cc: matti.aarnio@xxxxxxxxxxx, linux-net@xxxxxxxxxxxxxxx, netdev@xxxxxxxxxxx, davem@xxxxxxxxxxxxx
In-reply-to: <E1DOyg4-0000iB-00@gondolin.me.apana.org.au>
References: <20050422.204610.96031992.yoshfuji@linux-ipv6.org> <E1DOyg4-0000iB-00@gondolin.me.apana.org.au>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.6+20040907i
On Fri, Apr 22, 2005 at 11:58:40PM +1000, Herbert Xu wrote:
> 
> Indeed, it's a bug in selinux.  The length should be skb->tail - skb->data,
> and not skb->tail - skb->head.  In fact, we could be vulgar and write it as
> skb->len :)

I was just reading ipv6_skip_exthdr and it occured to me that we can
get rid of len altogether.  The only place where len is used is to
check whether the skb has two bytes for ipv6_opt_hdr.  This check
is done by skb_header_pointer/skb_copy_bits anyway.

Now it might appear that we've made the code slower by deferring
the check to skb_copy_bits.  However, this check should not trigger
in the common case so this is OK.

Signed-off-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>

This patch supercedes the previous one.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Attachment: p
Description: Text document

<Prev in Thread] Current Thread [Next in Thread>