Prev: [074/205] ipv6: fix NULL reference in proxy neighbor discovery
Next: [112/205] x86: Fix x2apic preenabled system with kexec
From: Greg KH on 30 Jul 2010 14:30 2.6.34-stable review patch. If anyone has any objections, please let us know. ------------------ From: Eric Dumazet <eric.dumazet(a)gmail.com> commit 499031ac8a3df6738f6186ded9da853e8ea18253 upstream. We should release dst if dst->error is set. Bug introduced in 2.6.14 by commit e104411b82f5c ([XFRM]: Always release dst_entry on error in xfrm_lookup) Signed-off-by: Eric Dumazet <eric.dumazet(a)gmail.com> Signed-off-by: Patrick McHardy <kaber(a)trash.net> Signed-off-by: Greg Kroah-Hartman <gregkh(a)suse.de> --- net/ipv6/netfilter/ip6t_REJECT.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) --- a/net/ipv6/netfilter/ip6t_REJECT.c +++ b/net/ipv6/netfilter/ip6t_REJECT.c @@ -96,9 +96,11 @@ static void send_reset(struct net *net, fl.fl_ip_dport = otcph.source; security_skb_classify_flow(oldskb, &fl); dst = ip6_route_output(net, NULL, &fl); - if (dst == NULL) + if (dst == NULL || dst->error) { + dst_release(dst); return; - if (dst->error || xfrm_lookup(net, &dst, &fl, NULL, 0)) + } + if (xfrm_lookup(net, &dst, &fl, NULL, 0)) return; hh_len = (dst->dev->hard_header_len + 15)&~15; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |