We may exit without releasing the dst_entry on pmtu discovery, so don't return directly but goto the te error handling. This also makes sure that the statistic counter gets updated.
Fixes: ccd740cbc6e0 ("vti6: Add pmtu handling to vti6_xmit.") Reported-by: Mark McKinstry <mark.mckins...@alliedtelesis.co.nz> Signed-off-by: Steffen Klassert <steffen.klass...@secunet.com> --- net/ipv6/ip6_vti.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/ipv6/ip6_vti.c b/net/ipv6/ip6_vti.c index 0a8610b..555ac2b 100644 --- a/net/ipv6/ip6_vti.c +++ b/net/ipv6/ip6_vti.c @@ -479,7 +479,8 @@ vti6_xmit(struct sk_buff *skb, struct net_device *dev, struct flowi *fl) icmp_send(skb, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED, htonl(mtu)); - return -EMSGSIZE; + err = -EMSGSIZE; + goto tx_err_dst_release; } err = dst_output(t->net, skb->sk, skb); -- 1.9.1