commit dfee0a725bb027b749ffdd318eb48b91d564b266 Author: Olaf Kirch Date: Fri Mar 9 13:55:38 2007 -0800 [IPV6]: Fix for ipv6_setsockopt NULL dereference I came across this bug in http://bugzilla.kernel.org/show_bug.cgi?id=8155 Signed-off-by: Olaf Kirch Acked-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller Index: linux-2.6.18/net/ipv6/ipv6_sockglue.c =================================================================== --- linux-2.6.18.orig/net/ipv6/ipv6_sockglue.c +++ linux-2.6.18/net/ipv6/ipv6_sockglue.c @@ -408,7 +408,7 @@ static int do_ipv6_setsockopt(struct soc } /* routing header option needs extra check */ - if (optname == IPV6_RTHDR && opt->srcrt) { + if (optname == IPV6_RTHDR && opt && opt->srcrt) { struct ipv6_rt_hdr *rthdr = opt->srcrt; if (rthdr->type) goto sticky_done;