summaryrefslogtreecommitdiffstats
path: root/net/tls/tls_device.c
diff options
context:
space:
mode:
authorJakub Kicinski <jakub.kicinski@netronome.com>2019-08-30 12:25:47 +0200
committerDavid S. Miller <davem@davemloft.net>2019-08-31 23:44:28 -0700
commit15a7dea750e0162f273c6e61a94f96944b75b31e (patch)
tree3d5d9bed6fd3f7e42183e803c1540895d89c4b71 /net/tls/tls_device.c
parented6e8103ba72af6921989cf0cf2ccde5efa7af22 (diff)
downloadlinux-15a7dea750e0162f273c6e61a94f96944b75b31e.tar.gz
linux-15a7dea750e0162f273c6e61a94f96944b75b31e.tar.bz2
linux-15a7dea750e0162f273c6e61a94f96944b75b31e.zip
net/tls: use RCU protection on icsk->icsk_ulp_data
We need to make sure context does not get freed while diag code is interrogating it. Free struct tls_context with kfree_rcu(). We add the __rcu annotation directly in icsk, and cast it away in the datapath accessor. Presumably all ULPs will do a similar thing. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tls/tls_device.c')
-rw-r--r--net/tls/tls_device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/tls/tls_device.c b/net/tls/tls_device.c
index a470df7ffcf9..e188139f0464 100644
--- a/net/tls/tls_device.c
+++ b/net/tls/tls_device.c
@@ -61,7 +61,7 @@ static void tls_device_free_ctx(struct tls_context *ctx)
if (ctx->rx_conf == TLS_HW)
kfree(tls_offload_ctx_rx(ctx));
- tls_ctx_free(ctx);
+ tls_ctx_free(NULL, ctx);
}
static void tls_device_gc_task(struct work_struct *work)