Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1677376pxu; Sun, 6 Dec 2020 03:44:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJwkxH+cMtCzPDG05jBLd0HynJNVdqlLzLcMfl45y/1f48Q4XYJRouJPNUyZXLLR6m/WyMA3 X-Received: by 2002:a17:906:1199:: with SMTP id n25mr14638029eja.293.1607255089118; Sun, 06 Dec 2020 03:44:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607255089; cv=none; d=google.com; s=arc-20160816; b=y+QJUZ9M5ATMji6jjEvrJI7oadNqrCCQMIzuFvpjW8NVQxyQqxNj3xzmS3SNR6aMzK 24XKuvLHYqfs0fzWz9E/RdFyFpelieAgqLtSys5+V+3cNWjrIYgW7Dxw5YOXPeyllY/Y 7OcMf3AwYgejbwUX7WUe4JjaKDF/SR1yptHRJATpm6+tjNQsP1b7D7udhytNIFn76EGP LdYlhnX7wDgzquz3HW3YUH4LIASwbjs0l6JhmmKE460YoWVqFvbfZadeebYrg7Ij5fp7 gDZd8pVkDQYwGySUaYRZK4TqPfbWxWU+yVtOqYPumxRs2lmn/LZZS691rXPEW+OQI83P 7Kwg== 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; bh=9B0Ka5ruSID3Gir1fvW7/UjmonwmbqcEk4S0WRPM7eE=; b=yLuSx8wlI38V50gI7UQY3AmrkviahSuxsz/gvIZ4KAHThj3IQpyr+g41cP9Vo6oT5e KSwijmE/wd8HO0W7o3BDuHlB/PGxAoUbFCzhAa9KIzvaNJj5FJ+jDV/N9dJ5FnKfq9fG RB+cXz8V97ugDWVQSr3XJlnzaHwW6UGfIJNaJJh7HpmrmkES4IWgFVZHRnbHveHnFfmf 9p8jvyGv8D953UlpENwC2kE2sRWe4We/f3X3x6Vk+Md6E+l/gGQd3AZKJY/s2QleQvsn 65xvmordliIj4fUukMxVmWE18kLGv4R52Y1hXIa2A0R1T/xNTp30Z08DTumF9jvTSIW8 pntQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dn3si6148531edb.35.2020.12.06.03.44.26; Sun, 06 Dec 2020 03:44:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728764AbgLFLlU (ORCPT + 99 others); Sun, 6 Dec 2020 06:41:20 -0500 Received: from mail.kernel.org ([198.145.29.99]:38850 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728754AbgLFLlT (ORCPT ); Sun, 6 Dec 2020 06:41:19 -0500 From: Greg Kroah-Hartman Authentication-Results: mail.kernel.org; dkim=permerror (bad message/signature format) To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Udai Sharma , Vinay Kumar Yadav , Jakub Kicinski Subject: [PATCH 4.19 26/32] chelsio/chtls: fix panic during unload reload chtls Date: Sun, 6 Dec 2020 12:17:26 +0100 Message-Id: <20201206111557.024869134@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201206111555.787862631@linuxfoundation.org> References: <20201206111555.787862631@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Vinay Kumar Yadav [ Upstream commit e3d5e971d2f83d8ddd4b91a50cea4517fb488383 ] there is kernel panic in inet_twsk_free() while chtls module unload when socket is in TIME_WAIT state because sk_prot_creator was not preserved on connection socket. Fixes: cc35c88ae4db ("crypto : chtls - CPL handler definition") Signed-off-by: Udai Sharma Signed-off-by: Vinay Kumar Yadav Link: https://lore.kernel.org/r/20201125214913.16938-1-vinay.yadav@chelsio.com Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- drivers/crypto/chelsio/chtls/chtls_cm.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/crypto/chelsio/chtls/chtls_cm.c +++ b/drivers/crypto/chelsio/chtls/chtls_cm.c @@ -1079,6 +1079,7 @@ static struct sock *chtls_recv_sock(stru oreq->ts_recent = PASS_OPEN_TID_G(ntohl(req->tos_stid)); sk_setup_caps(newsk, dst); + newsk->sk_prot_creator = lsk->sk_prot_creator; csk->sk = newsk; csk->passive_reap_next = oreq; csk->tx_chan = cxgb4_port_chan(ndev);