summaryrefslogtreecommitdiff
path: root/net/core/request_sock.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2015-10-02 21:43:23 +0300
committerDavid S. Miller <davem@davemloft.net>2015-10-03 14:32:36 +0300
commitfff1f3001cc58b5064a0f1154a7ac09b76f29c44 (patch)
tree910fe6f27dc9b9b7c6a0a56a9442ee264c9a6667 /net/core/request_sock.c
parentf6d3125fa3c2f55ddf7cf69365c41089de6cfae6 (diff)
downloadlinux-fff1f3001cc58b5064a0f1154a7ac09b76f29c44.tar.xz
tcp: add a spinlock to protect struct request_sock_queue
struct request_sock_queue fields are currently protected by the listener 'lock' (not a real spinlock) We need to add a private spinlock instead, so that softirq handlers creating children do not have to worry with backlog notion that the listener 'lock' carries. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/request_sock.c')
-rw-r--r--net/core/request_sock.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/core/request_sock.c b/net/core/request_sock.c
index e22cfa4ed25f..8d9fd31d3d06 100644
--- a/net/core/request_sock.c
+++ b/net/core/request_sock.c
@@ -58,6 +58,7 @@ int reqsk_queue_alloc(struct request_sock_queue *queue,
return -ENOMEM;
get_random_bytes(&lopt->hash_rnd, sizeof(lopt->hash_rnd));
+ spin_lock_init(&queue->rskq_lock);
spin_lock_init(&queue->syn_wait_lock);
spin_lock_init(&queue->fastopenq.lock);