From: Eric Dumazet Date: Tue, 20 Nov 2012 20:14:51 +0000 (-0500) Subject: ipv6: fix inet6_csk_update_pmtu() return value X-Git-Tag: v3.7-rc7~22^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b4dd006760d671337b62532277b0296bcee8dfd4;p=platform%2Fkernel%2Flinux-exynos.git ipv6: fix inet6_csk_update_pmtu() return value In case of error, inet6_csk_update_pmtu() should consistently return NULL. Bug added in commit 35ad9b9cf7d8a (ipv6: Add helper inet6_csk_update_pmtu().) Reported-by: LluĂ­s Batlle i Rossell Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller --- diff --git a/net/ipv6/inet6_connection_sock.c b/net/ipv6/inet6_connection_sock.c index c4f9341..3064785 100644 --- a/net/ipv6/inet6_connection_sock.c +++ b/net/ipv6/inet6_connection_sock.c @@ -252,6 +252,7 @@ struct dst_entry *inet6_csk_update_pmtu(struct sock *sk, u32 mtu) return NULL; dst->ops->update_pmtu(dst, sk, NULL, mtu); - return inet6_csk_route_socket(sk, &fl6); + dst = inet6_csk_route_socket(sk, &fl6); + return IS_ERR(dst) ? NULL : dst; } EXPORT_SYMBOL_GPL(inet6_csk_update_pmtu);