Message ID | 1331795591.2543.22.camel@edumazet-laptop |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
From: Eric Dumazet <eric.dumazet@gmail.com> Date: Thu, 15 Mar 2012 00:13:11 -0700 > [PATCH] ipv6: fix icmp6_dst_alloc() > > commit 87a115783 ( ipv6: Move xfrm_lookup() call down into > icmp6_dst_alloc().) forgot to convert one error path, leading > to crashes in mld_sendpack() > > Many thanks to Dave Jones for providing a very complete bug report. > > Reported-by: Dave Jones <davej@redhat.com> > Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Applied and queued up for -stable, thanks. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 8c2e3ab..22b7664 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -1077,7 +1077,7 @@ struct dst_entry *icmp6_dst_alloc(struct net_device *dev, struct net *net = dev_net(dev); if (unlikely(!idev)) - return NULL; + return ERR_PTR(-ENODEV); rt = ip6_dst_alloc(&net->ipv6.ip6_dst_ops, dev, 0); if (unlikely(!rt)) {