Lines Matching refs:ctx
33 struct tcp_fastopen_context *ctx =
35 crypto_free_cipher(ctx->tfm);
36 kfree(ctx);
42 struct tcp_fastopen_context *ctx, *octx;
44 ctx = kmalloc(sizeof(*ctx), GFP_KERNEL);
45 if (!ctx)
47 ctx->tfm = crypto_alloc_cipher("aes", 0, 0);
49 if (IS_ERR(ctx->tfm)) {
50 err = PTR_ERR(ctx->tfm);
51 error: kfree(ctx);
55 err = crypto_cipher_setkey(ctx->tfm, key, len);
58 crypto_free_cipher(ctx->tfm);
61 memcpy(ctx->key, key, len);
67 rcu_assign_pointer(tcp_fastopen_ctx, ctx);
78 struct tcp_fastopen_context *ctx;
84 ctx = rcu_dereference(tcp_fastopen_ctx);
85 if (ctx) {
86 crypto_cipher_encrypt_one(ctx->tfm, foc->val, path);