Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp1985033pxx; Sat, 31 Oct 2020 04:52:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwizzcCEcT7hRkf8UrqBUOxVbC+4M4AXYskfJ6KtKq9vt40mvxxwOKcwDwDXjIB/bxNTvGP X-Received: by 2002:aa7:d493:: with SMTP id b19mr6006655edr.279.1604145138983; Sat, 31 Oct 2020 04:52:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604145138; cv=none; d=google.com; s=arc-20160816; b=qzdDOoUTLSh//Iyeem6VXoeVoygah+2Bws7hjbtUKXoCbDRFr3Js7+zjjiJRoDRUEl AV2EAG8IdiZi8D/d0jOTCRnitFXyAK0EA27wQdUWKoAgaWgQKsHgDSCZNKVPTz6OFXCT MbbSnm45qJHOixs92CY/vS3f6ZggKsV5BTv1f7wnkBQ6sbg6ZtyDsetMRp2NpBTlp/oS RlFElHwJJCrjUsoSfd6XU2t2V8+Ev1p9dlSxaZVPKdqRtg04KjmyBWCp17EjIH/sXvJy TT9oxo4nUIBE5tyQ4srvnsu1gfqv1dcH7JMx1gaa15BJhvkivfFkf6h7vC+Onsz9SXXM wVBg== 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=eSfv7SFHJE7FLA/wh2rkFl0Mf5Ih0Q/nVLDwsIgKnQc=; b=Ojh2oBQquRec3E7s8hKTesSGZEsnOd4GWHvWGSC4PHMVKnQmZTS8iWjcof/6NtfhM3 31O7dmf0ycT1a+N88VhK6qacifhoOpPXMjILPvOzRVcyCAESFmchtogRT19JqfdhoFeu tu25Rchc6WUENRkWOPzbCKjKPlpxSzADZ4d9TbfI/CDcjNNh245dofjqwtW803rZ7UqL QrHR/vZEENkHhUFgSuKZKN+DVPYu21DS8ue7hWRKmpeRokPHNeGDzU2aK8a+aLQ7Dmth eywRB3QW6rpNbRRiU+7kTJC9RAOHAhg0HnTec/1GuLIInHwRin+KAIw5NvqZJyKXRr9p LzEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wYOdXipM; 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 l11si7085891ejx.254.2020.10.31.04.51.56; Sat, 31 Oct 2020 04:52:18 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=default header.b=wYOdXipM; 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 S1727650AbgJaLue (ORCPT + 99 others); Sat, 31 Oct 2020 07:50:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:40232 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727624AbgJaLlO (ORCPT ); Sat, 31 Oct 2020 07:41:14 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2EF0820719; Sat, 31 Oct 2020 11:41:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604144473; bh=U15Lu1DZVZ07ITKi+DQJlpVIP+YXEL/G7W7b4jkm63c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wYOdXipM2JC4Sne0WF/PhE3EiflN7aHlZAvyku9eTjko/7YrhB3ZU+HYFJZFkBaJQ UnI+K/WfU7tV72KjL8kwQUfnQ0lf/VM2HnZ5Xjo84eUy/VPvvAR/SoYkoJcLTgGvA3 4ICKAd3CHR8NO5jt9kPoEp8F+FJM4Zq9bi5eOluw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Vinay Kumar Yadav , Jakub Kicinski Subject: [PATCH 5.8 32/70] chelsio/chtls: fix deadlock issue Date: Sat, 31 Oct 2020 12:36:04 +0100 Message-Id: <20201031113501.040725487@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201031113459.481803250@linuxfoundation.org> References: <20201031113459.481803250@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 28e9dcd9172028263c8225c15c4e329e08475e89 ] In chtls_pass_establish() we hold child socket lock using bh_lock_sock and we are again trying bh_lock_sock in add_to_reap_list, causing deadlock. Remove bh_lock_sock in add_to_reap_list() as lock is already held. Fixes: cc35c88ae4db ("crypto : chtls - CPL handler definition") Signed-off-by: Vinay Kumar Yadav Link: https://lore.kernel.org/r/20201025193538.31112-1-vinay.yadav@chelsio.com Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- drivers/crypto/chelsio/chtls/chtls_cm.c | 2 -- 1 file changed, 2 deletions(-) --- a/drivers/crypto/chelsio/chtls/chtls_cm.c +++ b/drivers/crypto/chelsio/chtls/chtls_cm.c @@ -1513,7 +1513,6 @@ static void add_to_reap_list(struct sock struct chtls_sock *csk = sk->sk_user_data; local_bh_disable(); - bh_lock_sock(sk); release_tcp_port(sk); /* release the port immediately */ spin_lock(&reap_list_lock); @@ -1522,7 +1521,6 @@ static void add_to_reap_list(struct sock if (!csk->passive_reap_next) schedule_work(&reap_task); spin_unlock(&reap_list_lock); - bh_unlock_sock(sk); local_bh_enable(); }