diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-09-19 05:16:45 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-09-19 05:54:35 +0200 |
commit | c3cbac06f54099bf75773419f38e3b48bfdcd45f (patch) | |
tree | 2bdef38f299a6031ac1c579e2043444a2207de1a /src/receive.c | |
parent | 049d7bd343aabf3dc2cb7fdb69c6666f2fb1d373 (diff) |
queueing: no need to memzero struct
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/receive.c')
-rw-r--r-- | src/receive.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/receive.c b/src/receive.c index efe53f4..0f4545b 100644 --- a/src/receive.c +++ b/src/receive.c @@ -389,13 +389,14 @@ static void packet_consume_data(struct wireguard_device *wg, struct sk_buff *skb return; } - ctx = kmem_cache_zalloc(crypt_ctx_cache, GFP_ATOMIC); + ctx = kmem_cache_alloc(crypt_ctx_cache, GFP_ATOMIC); if (unlikely(!ctx)) { dev_kfree_skb(skb); peer_put(ctx->keypair->entry.peer); noise_keypair_put(keypair); return; } + atomic_set(&ctx->is_finished, false); ctx->keypair = keypair; ctx->skb = skb; /* We already have a reference to peer from index_hashtable_lookup. */ |