Skip to content

Commit 253ff51

Browse files
Florian Westphaldavem330
authored andcommitted
tcp: syncookies: mark cookie_secret read_mostly
only written once. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 1fc3de9 commit 253ff51

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎net/ipv4/syncookies.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
extern int sysctl_tcp_syncookies;
2727

28-
static u32 syncookie_secret[2][16-4+SHA_DIGEST_WORDS];
28+
static u32 syncookie_secret[2][16-4+SHA_DIGEST_WORDS] __read_mostly;
2929

3030
#define COOKIEBITS 24 /* Upper bits store count */
3131
#define COOKIEMASK (((__u32)1 << COOKIEBITS) - 1)

‎net/ipv6/syncookies.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#define COOKIEBITS 24 /* Upper bits store count */
2525
#define COOKIEMASK (((__u32)1 << COOKIEBITS) - 1)
2626

27-
static u32 syncookie6_secret[2][16-4+SHA_DIGEST_WORDS];
27+
static u32 syncookie6_secret[2][16-4+SHA_DIGEST_WORDS] __read_mostly;
2828

2929
/* RFC 2460, Section 8.3:
3030
* [ipv6 tcp] MSS must be computed as the maximum packet size minus 60 [..]

0 commit comments

Comments
 (0)