]> git.baikalelectronics.ru Git - kernel.git/commitdiff
Revert "net/tls: fix tls_sk_proto_close executed repeatedly"
authorJakub Kicinski <kuba@kernel.org>
Mon, 20 Jun 2022 19:13:52 +0000 (12:13 -0700)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 23 Jun 2022 08:08:30 +0000 (10:08 +0200)
This reverts commit 16a7471ac000a3e00b90e128565d5e519e1f7b6e.

This commit was just papering over the issue, ULP should not
get ->update() called with its own sk_prot. Each ULP would
need to add this check.

Fixes: 16a7471ac000 ("net/tls: fix tls_sk_proto_close executed repeatedly")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: John Fastabend <john.fastabend@gmail.com>
Link: https://lore.kernel.org/r/20220620191353.1184629-1-kuba@kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
net/tls/tls_main.c

index 46bd5f26338bfb7a9418df016fbe56e7ff5ae84c..da176411c1b5fdb418ad8d78b9f5b1e7a6cd4d9c 100644 (file)
@@ -921,9 +921,6 @@ static void tls_update(struct sock *sk, struct proto *p,
 {
        struct tls_context *ctx;
 
-       if (sk->sk_prot == p)
-               return;
-
        ctx = tls_get_ctx(sk);
        if (likely(ctx)) {
                ctx->sk_write_space = write_space;