]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - net/ipv4/tcp.c
Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
[karo-tx-linux.git] / net / ipv4 / tcp.c
index 108ef2a6665c9157aae22c7ff0ed3359129c754a..032a96d78c99deda3b3298a305298f92776e2500 100644 (file)
@@ -3026,8 +3026,18 @@ static void __tcp_alloc_md5sig_pool(void)
                return;
 
        for_each_possible_cpu(cpu) {
+               void *scratch = per_cpu(tcp_md5sig_pool, cpu).scratch;
                struct ahash_request *req;
 
+               if (!scratch) {
+                       scratch = kmalloc_node(sizeof(union tcp_md5sum_block) +
+                                              sizeof(struct tcphdr),
+                                              GFP_KERNEL,
+                                              cpu_to_node(cpu));
+                       if (!scratch)
+                               return;
+                       per_cpu(tcp_md5sig_pool, cpu).scratch = scratch;
+               }
                if (per_cpu(tcp_md5sig_pool, cpu).md5_req)
                        continue;