]> git.baikalelectronics.ru Git - kernel.git/commit
[SELINUX]: Fix ipv6_skip_exthdr() invocation causing OOPS.
authorHerbert Xu <herbert@gondor.apana.org.au>
Mon, 25 Apr 2005 03:16:19 +0000 (20:16 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 25 Apr 2005 03:16:19 +0000 (20:16 -0700)
commite25976d660c5857ce7d6f1b72d0a6aff4171538d
tree63f376b3586412af712ffac7d500516c98f7bb2c
parent9f7c8289a1325eddddbc2532547c1f78b03e71d2
[SELINUX]: Fix ipv6_skip_exthdr() invocation causing OOPS.

The SELinux hooks invoke ipv6_skip_exthdr() with an incorrect
length final argument.  However, the length argument turns out
to be superfluous.

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@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/ipv6.h
net/ipv6/exthdrs_core.c
net/ipv6/icmp.c
security/selinux/hooks.c