aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_fastopen.c
diff options
context:
space:
mode:
authorHaishuang Yan <yanhaishuang@cmss.chinamobile.com>2017-09-26 23:35:41 -0400
committerDavid S. Miller <davem@davemloft.net>2017-10-01 20:55:54 -0400
commitdd000598a39b6937fcefdf143720ec9fb5250e72 (patch)
tree4dcbb885986897a2c5eceb910f8553f1a0cd6550 /net/ipv4/tcp_fastopen.c
parente1cfcbe82b4534bd0f99fef92a6d33843fd85e0e (diff)
ipv4: Remove the 'publish' logic in tcp_fastopen_init_key_once
The 'publish' logic is not necessary after commit dfea2aa65424 ("tcp: Do not call tcp_fastopen_reset_cipher from interrupt context"), because in tcp_fastopen_cookie_gen,it wouldn't call tcp_fastopen_init_key_once. Signed-off-by: Haishuang Yan <yanhaishuang@cmss.chinamobile.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_fastopen.c')
-rw-r--r--net/ipv4/tcp_fastopen.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/tcp_fastopen.c b/net/ipv4/tcp_fastopen.c
index 31b08ec38cb8..8c8f0f0af59d 100644
--- a/net/ipv4/tcp_fastopen.c
+++ b/net/ipv4/tcp_fastopen.c
@@ -13,7 +13,7 @@ struct tcp_fastopen_context __rcu *tcp_fastopen_ctx;
13 13
14static DEFINE_SPINLOCK(tcp_fastopen_ctx_lock); 14static DEFINE_SPINLOCK(tcp_fastopen_ctx_lock);
15 15
16void tcp_fastopen_init_key_once(bool publish) 16void tcp_fastopen_init_key_once(void)
17{ 17{
18 static u8 key[TCP_FASTOPEN_KEY_LENGTH]; 18 static u8 key[TCP_FASTOPEN_KEY_LENGTH];
19 19
@@ -23,7 +23,7 @@ void tcp_fastopen_init_key_once(bool publish)
23 * All call sites of tcp_fastopen_cookie_gen also check 23 * All call sites of tcp_fastopen_cookie_gen also check
24 * for a valid cookie, so this is an acceptable risk. 24 * for a valid cookie, so this is an acceptable risk.
25 */ 25 */
26 if (net_get_random_once(key, sizeof(key)) && publish) 26 if (net_get_random_once(key, sizeof(key)))
27 tcp_fastopen_reset_cipher(key, sizeof(key)); 27 tcp_fastopen_reset_cipher(key, sizeof(key));
28} 28}
29 29