Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp820105pxb; Tue, 3 Nov 2020 13:28:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJwlp6V+Ug5HwvkvvXpRWPekDV9D1TUumz+xDEAnXXFFVzW/Tm7Y1Nnll+Z03l7PZ3VpAkB6 X-Received: by 2002:a05:6402:a51:: with SMTP id bt17mr21721315edb.328.1604438896705; Tue, 03 Nov 2020 13:28:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604438896; cv=none; d=google.com; s=arc-20160816; b=nAV1kv9u8zURNgvBwsNGIQyAH/csnhnBghwK946h839ORLGQV6zcf+SSfd4yY93w7W jcnJAjoA/JuIkhoE6XuJtJRb+EtaT8YTeNGvch8ytp9VcaVE1aSl3zBPRXl771BLbSEM KezVuDtqDIQVzpBRreasWx6Mc9wt6u0Ha7abDVRUkNW4w8TTuzIZQdacZM13ZmTsguz+ MIeHCofrGip1VYE89OfVGzzRA+s6uL13FysxBx1TvUK3nQcQQ/spfM8I2R2RC1KoVKT8 rmolYnM2HSItnd1UWeh1+0y+12KqFcgPDdMX02byjt1YPs6lzHvCh29YBRqLPwMazI7r tfuQ== 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=xrGHIjr11IhviEnE1pOlX/DJdf/Tm5vEgSfWQGdmA7w=; b=uE8jPUqIHwSfB4sYfxecQFEw/Pc7PbUgFUmUMt3qXxwl6qOSs7Ov9I9NiYOzmj398y KToaTo8RKv+g3+pzblyTPJxm/mHV9VkbVCmS/HbgJoKdYCjv7H6+yKKKcRzp7QvUXIhy vD5OUCXydoCkMvN23/j/ZktUk+67Qz8Uqc06I5FNIXXUcdkLaFhSTP3Ob8hQb2xawWKQ mRE3/+/zu13qJquZTOr4suvQkgYlOkYfuoMBan4BgUHcBrIdkOp/D4SwLeiP0z7Zxtsd XZntdRxfque0InBPLyND9yEp0hR6lnEpzmC2CEuAhabtWZQTswWB0QIAvtCieyWoXNj5 DA6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jDGDRzWc; 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 i14si43296eje.464.2020.11.03.13.27.54; Tue, 03 Nov 2020 13:28:16 -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; dkim=pass header.i=@kernel.org header.s=default header.b=jDGDRzWc; 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 S2388151AbgKCVZW (ORCPT + 99 others); Tue, 3 Nov 2020 16:25:22 -0500 Received: from mail.kernel.org ([198.145.29.99]:39930 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387681AbgKCVCn (ORCPT ); Tue, 3 Nov 2020 16:02:43 -0500 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 835B120658; Tue, 3 Nov 2020 21:02:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604437363; bh=E9z3aHlxsNKSjY5o5d6slDJGnezVSrMBFH3spSDm8Ko=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jDGDRzWcJcj0JJ0gJ4hs8Fh92EmrARfxT7dJTnATJTkKzJxlC0LEMeA6/XBTxpZMi r4JQl7/fJYkPlAkYWTP+J/2H65rjE9ePkfAxwpsVEiV82A2mdEa5mXnkwRRjvsSmv7 brcduNYxrg57J9pO3Sk5bnq1hRjruYDoFjAkOdzI= 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 4.19 007/191] chelsio/chtls: fix deadlock issue Date: Tue, 3 Nov 2020 21:34:59 +0100 Message-Id: <20201103203233.613602306@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201103203232.656475008@linuxfoundation.org> References: <20201103203232.656475008@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 @@ -1348,7 +1348,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); @@ -1357,7 +1356,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(); }