]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: fix a lockdep issue in tcp_fastopen_reset_cipher()
authorEric Dumazet <edumazet@google.com>
Thu, 2 Nov 2017 18:53:04 +0000 (11:53 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 3 Nov 2017 06:51:39 +0000 (15:51 +0900)
commit22c36463beb606c64c6afed309568f1116a61cf2
tree56d6e257cef00eff4bb0e2af027509011615e4fa
parentb47e9cec01f9657fa5313b04dae488a9ad57eb32
tcp: fix a lockdep issue in tcp_fastopen_reset_cipher()

icsk_accept_queue.fastopenq.lock is only fully initialized at listen()
time.

LOCKDEP is not happy if we attempt a spin_lock_bh() on it, because
of missing annotation. (Although kernel runs just fine)

Lets use net->ipv4.tcp_fastopen_ctx_lock to protect ctx access.

Fixes: ce569a4ad560 ("tcp: socket option to set TCP fast open key")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Yuchung Cheng <ycheng@google.com>
Cc: Christoph Paasch <cpaasch@apple.com>
Reviewed-by: Christoph Paasch <cpaasch@apple.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_fastopen.c