summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorIlya Lesokhin <ilyal@mellanox.com>2017-11-13 10:22:44 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-12-14 09:53:13 +0100
commitf0e1cd056e99c1ac7ec59f46ad152c11f1b69570 (patch)
treed0c2cf1ba1509a9e51eb13b0689a09417ff3f8e2 /net
parent2de359062feea90c1e8baa2fa9771ba98d1fadfa (diff)
downloadlinux-stable-f0e1cd056e99c1ac7ec59f46ad152c11f1b69570.tar.gz
linux-stable-f0e1cd056e99c1ac7ec59f46ad152c11f1b69570.tar.bz2
linux-stable-f0e1cd056e99c1ac7ec59f46ad152c11f1b69570.zip
tls: Use kzalloc for aead_request allocation
[ Upstream commit 61ef6da622aa7b66bf92991bd272490eea6c712e ] Use kzalloc for aead_request allocation as we don't set all the bits in the request. Fixes: 3c4d7559159b ('tls: kernel TLS support') Signed-off-by: Ilya Lesokhin <ilyal@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <alexander.levin@verizon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net')
-rw-r--r--net/tls/tls_sw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c
index 7d80040a37b6..f00383a37622 100644
--- a/net/tls/tls_sw.c
+++ b/net/tls/tls_sw.c
@@ -219,7 +219,7 @@ static int tls_do_encryption(struct tls_context *tls_ctx,
struct aead_request *aead_req;
int rc;
- aead_req = kmalloc(req_size, flags);
+ aead_req = kzalloc(req_size, flags);
if (!aead_req)
return -ENOMEM;