]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: md5: use kmalloc() backed scratch areas
authorEric Dumazet <edumazet@google.com>
Mon, 27 Jun 2016 16:51:53 +0000 (18:51 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 1 Jul 2016 08:02:55 +0000 (04:02 -0400)
commitecf631e4b5c23bf0875816de9caeb5aa15b3e3b2
treebf400027c33a83030519e00b0c391e61e29a5566
parent00e13653361e6059b24c7be80c1f2397b1c48563
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>
include/net/tcp.h
net/ipv4/tcp.c
net/ipv4/tcp_ipv4.c
net/ipv6/tcp_ipv6.c