]> git.baikalelectronics.ru Git - kernel.git/commit
tcp/dccp: fix lockdep splat in inet_csk_route_req()
authorEric Dumazet <edumazet@google.com>
Sun, 22 Oct 2017 19:33:57 +0000 (12:33 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 23 Oct 2017 04:45:25 +0000 (05:45 +0100)
commitf16f02f056325ff63f2024d4d7d916e3cbd1ab1e
tree800cd8cbbd05b2d687ed7fc8d5374e318e3ba985
parent125aea273f02dbdee24c2307f49dad84c39c6e71
tcp/dccp: fix lockdep splat in inet_csk_route_req()

This patch fixes the following lockdep splat in inet_csk_route_req()

  lockdep_rcu_suspicious
  inet_csk_route_req
  tcp_v4_send_synack
  tcp_rtx_synack
  inet_rtx_syn_ack
  tcp_fastopen_synack_time
  tcp_retransmit_timer
  tcp_write_timer_handler
  tcp_write_timer
  call_timer_fn

Thread running inet_csk_route_req() owns a reference on the request
socket, so we have the guarantee ireq->ireq_opt wont be changed or
freed.

lockdep can enforce this invariant for us.

Fixes: 6b5ce7d0dd33 ("tcp/dccp: fix ireq->opt races")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/inet_connection_sock.c