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 | ba717fc654c1ecfe5f731f43f7c83800e8a1c296 (patch) | |
tree | cd8fef0666bc0ec526fa9fec0fddb60db7cd064e /src/send.c | |
parent | receive: use netif_receive_skb instead of netif_rx (diff) | |
download | wireguard-monolithic-historical-ba717fc654c1ecfe5f731f43f7c83800e8a1c296.tar.xz wireguard-monolithic-historical-ba717fc654c1ecfe5f731f43f7c83800e8a1c296.zip |
queueing: no need to memzero struct
Diffstat (limited to 'src/send.c')
-rw-r--r-- | src/send.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -229,12 +229,13 @@ static void packet_create_data(struct wireguard_peer *peer, struct sk_buff_head struct crypt_ctx *ctx; struct wireguard_device *wg = peer->device; - ctx = kmem_cache_zalloc(crypt_ctx_cache, GFP_ATOMIC); + ctx = kmem_cache_alloc(crypt_ctx_cache, GFP_ATOMIC); if (unlikely(!ctx)) { skb_queue_purge(packets); goto err_drop_refs; } /* This function consumes the passed references to peer and keypair. */ + atomic_set(&ctx->is_finished, false); ctx->keypair = keypair; ctx->peer = peer; __skb_queue_head_init(&ctx->packets); |