UPSTREAM: net-tcp: fix panic in tcp_fastopen_cache_set()

We had some reports of crashes using TCP fastopen, and Dave Jones
gave a nice stack trace pointing to the error.

Issue is that tcp_get_metrics() should not be called with a NULL dst

BUG=chromium:271766
TEST=boot, log in, enable TCP fast open in flags, restart browser
go to google.com and other sites, no crashes

(accepted upstream http://patchwork.ozlabs.org/patch/291068/ )
Fixes: 1fe4c481ba637 ("net-tcp: Fast Open client - cookie cache")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Dave Jones <davej@redhat.com>
Cc: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Sonny Rao <sonnyrao@chromium.org>

Change-Id: I6baa3a70403e520a817d455167486b8222eabf25
Reviewed-on: https://chromium-review.googlesource.com/176846
Commit-Queue: Sonny Rao <sonnyrao@chromium.org>
Tested-by: Sonny Rao <sonnyrao@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
1 file changed