diff options
author | Eric Dumazet <edumazet@google.com> | 2016-06-27 18:51:53 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-07-01 10:02:55 +0200 |
commit | 19689e38eca5d7b32755182d4e62efd7a5376c45 (patch) | |
tree | bf400027c33a83030519e00b0c391e61e29a5566 /include/net/tcp.h | |
parent | Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher... (diff) | |
download | linux-19689e38eca5d7b32755182d4e62efd7a5376c45.tar.xz linux-19689e38eca5d7b32755182d4e62efd7a5376c45.zip |
tcp: md5: use kmalloc() backed scratch areas
Some arches have virtually mapped kernel stacks, or will soon have.
tcp_md5_hash_header() uses an automatic variable to copy tcp header
before mangling th->check and calling crypto function, which might
be problematic on such arches.
David says that using percpu storage is also problematic on non SMP
builds.
Just use kmalloc() to allocate scratch areas.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Andy Lutomirski <luto@amacapital.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/tcp.h')
-rw-r--r-- | include/net/tcp.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h index d825858fe4f1..c00e7d51bb18 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -1384,7 +1384,7 @@ union tcp_md5sum_block { /* - pool: digest algorithm, hash description and scratch buffer */ struct tcp_md5sig_pool { struct ahash_request *md5_req; - union tcp_md5sum_block md5_blk; + void *scratch; }; /* - functions */ @@ -1420,7 +1420,6 @@ static inline void tcp_put_md5sig_pool(void) local_bh_enable(); } -int tcp_md5_hash_header(struct tcp_md5sig_pool *, const struct tcphdr *); int tcp_md5_hash_skb_data(struct tcp_md5sig_pool *, const struct sk_buff *, unsigned int header_len); int tcp_md5_hash_key(struct tcp_md5sig_pool *hp, |