Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2907078iog; Mon, 27 Jun 2022 05:31:46 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vusClWsaw4GQxV/7MgUQe2cp6ZSzA5EKXrDbDiFfPnA5hrpSPo4W5Ms+01gOJilwe6ShXG X-Received: by 2002:a63:4722:0:b0:40d:289e:8637 with SMTP id u34-20020a634722000000b0040d289e8637mr12459989pga.362.1656333106471; Mon, 27 Jun 2022 05:31:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656333106; cv=none; d=google.com; s=arc-20160816; b=AfO/izXs7TApOznRCQsHNPt76e/3xFaj6K4Bn1OgEbqjmygjfY7YgVTXyzYt3G3cvq xC+RztL5bbahKbX23uGqiMZl1F3Kmgxi7K/SANppo7ixF1rCwKDGNASrZLF33YnWUSlw NQcPY9Cyi4AG5ud99y61M3uZbaIV5lDtRQNmE4qFb1fxw1ACSq4PMCX/kLS2DXP1633f r1hobDDy8EDpnW4oPD6K+yN9JSZ4lRvytLICPnnx6PYCMV/MCXz+ZeJ6peDJ6j9JhdT8 LqV+2Q/l3OlqYlo579IkUwqCA3j6BUmRZbitT+KoIf+iyd3qrVVJy3++aYnKdjyptTUP Uehw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=XlnQkXRBMICVMWz+ylI5ZddoeW4rR6A2m3E1p6hvrrk=; b=SUpKUfDkR9y6IKtbkzo4DKWoCK3sUGaJKAkoYF1770ZNU9NV3TZ95Fxp8nH5YG1M3a XKm9R2OSJVaHjwHVAdzKiMh96i5qL6eJ8iEkoDJqdRfbweUJWgiEbC7OnyUs6N4IgrjX lB7TkvAqb+Jg8IVZh//xy06+kcO2tELsg0YooSCEzCcq3AqmToqsoyXmvqlz7ksKbrrR noa1Msf6L/N7+NeZW7M6AgMoENjDP8I2c3iBhImKNfPZhvxCOgd87eBKCDlBFkatW3mp USPakN/4iymNdrrROF7s26oVlS5B+7oOXoS1LZsz0s5LGDmiufpXDfnxU62wY0k6c4Gq K++g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=tQH9WABq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m19-20020a056a00081300b00525626fe8c0si17084458pfk.365.2022.06.27.05.31.34; Mon, 27 Jun 2022 05:31:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=tQH9WABq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235008AbiF0L0A (ORCPT + 99 others); Mon, 27 Jun 2022 07:26:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234832AbiF0LZQ (ORCPT ); Mon, 27 Jun 2022 07:25:16 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21EBC65C1; Mon, 27 Jun 2022 04:25:08 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9068661497; Mon, 27 Jun 2022 11:25:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8FB76C341D3; Mon, 27 Jun 2022 11:25:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1656329107; bh=8MbN9/l8r4l07VQsymiCOiUg9CkoZNTexzO2dpr8eNA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tQH9WABqyGJLNUMveD1Ci4WkzrMNVkTbb/6IxFG85mPTdR/7UqshXJTHFI5dSKJyH yojuV+UpHvL4qWFCSCvt8aDIpTMTKJpFE3qg4soQxWdK7+iirevYViSsGer0xG9LyG HhZ/AVa7vXgVuXF9egupMww4pCfO+9mITNE0Wz/I= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jakub Kicinski , John Fastabend , Paolo Abeni , Sasha Levin Subject: [PATCH 5.10 053/102] Revert "net/tls: fix tls_sk_proto_close executed repeatedly" Date: Mon, 27 Jun 2022 13:21:04 +0200 Message-Id: <20220627111935.046120109@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220627111933.455024953@linuxfoundation.org> References: <20220627111933.455024953@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jakub Kicinski [ Upstream commit 1b205d948fbb06a7613d87dcea0ff5fd8a08ed91 ] This reverts commit 69135c572d1f84261a6de2a1268513a7e71753e2. 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: 69135c572d1f ("net/tls: fix tls_sk_proto_close executed repeatedly") Signed-off-by: Jakub Kicinski Reviewed-by: John Fastabend Link: https://lore.kernel.org/r/20220620191353.1184629-1-kuba@kernel.org Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin --- net/tls/tls_main.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/net/tls/tls_main.c b/net/tls/tls_main.c index 9492528f5852..58d22d6b86ae 100644 --- a/net/tls/tls_main.c +++ b/net/tls/tls_main.c @@ -787,9 +787,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; -- 2.35.1