diff options
| author | Mat Martineau <[email protected]> | 2017-12-21 18:29:10 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2017-12-26 22:23:50 +0000 |
| commit | fb7df5e4000a6bc19e350a00a93b16c602bd2dd8 (patch) | |
| tree | 7c25fb9f884c1df909e4877bff6724606e0ecc58 /net/ipv4/tcp_ipv4.c | |
| parent | net: dsa: lan9303: lan9303_csr_reg_wait cleanups (diff) | |
| download | kernel-fb7df5e4000a6bc19e350a00a93b16c602bd2dd8.tar.gz kernel-fb7df5e4000a6bc19e350a00a93b16c602bd2dd8.zip | |
tcp: md5: Handle RCU dereference of md5sig_info
Dereference tp->md5sig_info in tcp_v4_destroy_sock() the same way it is
done in the adjacent call to tcp_clear_md5_list().
Resolves this sparse warning:
net/ipv4/tcp_ipv4.c:1914:17: warning: incorrect type in argument 1 (different address spaces)
net/ipv4/tcp_ipv4.c:1914:17: expected struct callback_head *head
net/ipv4/tcp_ipv4.c:1914:17: got struct callback_head [noderef] <asn:4>*<noident>
Signed-off-by: Mat Martineau <[email protected]>
Acked-by: Christoph Paasch <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/ipv4/tcp_ipv4.c')
| -rw-r--r-- | net/ipv4/tcp_ipv4.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index dd945b114215..5d203248123e 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c @@ -1911,7 +1911,7 @@ void tcp_v4_destroy_sock(struct sock *sk) /* Clean up the MD5 key list, if any */ if (tp->md5sig_info) { tcp_clear_md5_list(sk); - kfree_rcu(tp->md5sig_info, rcu); + kfree_rcu(rcu_dereference_protected(tp->md5sig_info, 1), rcu); tp->md5sig_info = NULL; } #endif |
