Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1679332pxu; Sun, 6 Dec 2020 03:49:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJypbl4TuBsfSGRSApsyaOZMdXTeAleRECk9jTZVsbTwLNteNIs5Jlwr0DhUJugyGl8qLLnB X-Received: by 2002:aa7:c313:: with SMTP id l19mr15789760edq.293.1607255374395; Sun, 06 Dec 2020 03:49:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607255374; cv=none; d=google.com; s=arc-20160816; b=fdyopRd/2V1KewNviMF/ItNLUQ0BZx17fTAydtcqBVe2ugzbOA/V2g2A9F4YK20DS4 shJsuYd/fA0i1IlfN2OfnMZiFmX0EYuwlFC1oLyTYThj4Z3jAdPXhUusapwGm7xL/xte 28eQ+fcgCXihfLHTaiL1+Ysy6q1EPlYN1DoZ9RTpA1nAwmXbCFDht195gLM/B9bLR5xM dk/lYKTniJlYKAdKiYlD+kQ4fvTZIv2JaDTdbv8yaySOTxC6UhEvEJ7KPy4kkj8ch7+C 8Y08Nf9kFNT8xtmmcaDmrNwFyR4PUVhAm3p6mZSzF1mawjhZoFFv6VmLjxmizL45asqx 6kOw== 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=aIqtdGec7vy73N8XvK0Ev2i5n8iDMU0759DmmyUwm3Q=; b=m7w6L0I9Eiay6mCs9i5NMh446tWsRGYeFfaKGnLR2Fve4O6woZeeETG63bMwtqfBUW VtHUHogYHs02ErtA8WIipo2wcxbZK/uwZ8njOhY/9N0HbVO+Sq8UuHJ819wie0jviOqR C0a2osK4W8IS1Oh/pDC96VqVbDP1k7QoMiwIWN9X2t1AmA/UwjMs/NfeEviRSUqLb8SH NlQJcLfduDfqI2uAwiEw4jOaqAAET8Xl3+a7fKI0oSWGo2t9D3vnZOWNG8jD2MGQVRsW rGEf7+2JQGDgdXQDI+zi1SRXTfnpzxgw0kUcMNjQ/9AlBfMqvQ3w0ostO/mF5YvZkign oWeQ== 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 rv27si4589511ejb.720.2020.12.06.03.49.11; Sun, 06 Dec 2020 03:49:34 -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 S1728184AbgLFLru (ORCPT + 99 others); Sun, 6 Dec 2020 06:47:50 -0500 Received: from mail.kernel.org ([198.145.29.99]:41146 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727842AbgLFLm1 (ORCPT ); Sun, 6 Dec 2020 06:42:27 -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 5.4 18/39] chelsio/chtls: fix panic during unload reload chtls Date: Sun, 6 Dec 2020 12:17:22 +0100 Message-Id: <20201206111555.553421649@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201206111554.677764505@linuxfoundation.org> References: <20201206111554.677764505@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 @@ -1077,6 +1077,7 @@ static struct sock *chtls_recv_sock(stru sk_setup_caps(newsk, dst); ctx = tls_get_ctx(lsk); newsk->sk_destruct = ctx->sk_destruct; + newsk->sk_prot_creator = lsk->sk_prot_creator; csk->sk = newsk; csk->passive_reap_next = oreq; csk->tx_chan = cxgb4_port_chan(ndev);