]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
tcp: syncookies: mark cookie_secret read_mostly
authorFlorian Westphal <fw@strlen.de>
Tue, 26 Aug 2014 10:55:53 +0000 (12:55 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 27 Aug 2014 23:30:49 +0000 (16:30 -0700)
only written once.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/syncookies.c
net/ipv6/syncookies.c

index c0c75688896e06bd1b64384c94e7db758f842d0b..0431a8f3c8f458538e37543a0b37a091da0c04bb 100644 (file)
@@ -25,7 +25,7 @@
 
 extern int sysctl_tcp_syncookies;
 
-static u32 syncookie_secret[2][16-4+SHA_DIGEST_WORDS];
+static u32 syncookie_secret[2][16-4+SHA_DIGEST_WORDS] __read_mostly;
 
 #define COOKIEBITS 24  /* Upper bits store count */
 #define COOKIEMASK (((__u32)1 << COOKIEBITS) - 1)
index 83cea1d39466affce703d7c1b737a386bf3faecf..c643dc907ce773badc1c8ec9029b20909c21698a 100644 (file)
@@ -24,7 +24,7 @@
 #define COOKIEBITS 24  /* Upper bits store count */
 #define COOKIEMASK (((__u32)1 << COOKIEBITS) - 1)
 
-static u32 syncookie6_secret[2][16-4+SHA_DIGEST_WORDS];
+static u32 syncookie6_secret[2][16-4+SHA_DIGEST_WORDS] __read_mostly;
 
 /* RFC 2460, Section 8.3:
  * [ipv6 tcp] MSS must be computed as the maximum packet size minus 60 [..]