From: David S. Miller Date: Fri, 31 Aug 2007 21:39:44 +0000 (-0700) Subject: [TCP]: 'dst' can be NULL in tcp_rto_min() X-Git-Tag: v2.6.23-rc6~22^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5c127c58ae9bf196d787815b1bd6b0aec5aee816;p=thirdparty%2Fkernel%2Flinux.git [TCP]: 'dst' can be NULL in tcp_rto_min() Reported by Rick Jones. Signed-off-by: David S. Miller --- diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 1ee72127462bf..bbad2cdb74b7c 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -560,7 +560,7 @@ static u32 tcp_rto_min(struct sock *sk) struct dst_entry *dst = __sk_dst_get(sk); u32 rto_min = TCP_RTO_MIN; - if (dst_metric_locked(dst, RTAX_RTO_MIN)) + if (dst && dst_metric_locked(dst, RTAX_RTO_MIN)) rto_min = dst->metrics[RTAX_RTO_MIN-1]; return rto_min; }