Received: by 2002:a05:7412:a9a3:b0:f9:327e:43ab with SMTP id o35csp27267rdh; Mon, 18 Dec 2023 03:24:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IFMkS7XNIdRuK4fl+CUz6HC+FoeBj9lghwKGhki0bZ3VKgN1wdkSgcfOlu3xebo7xjtgOSF X-Received: by 2002:a05:6512:752:b0:50e:2f29:4794 with SMTP id c18-20020a056512075200b0050e2f294794mr1217406lfs.86.1702898696093; Mon, 18 Dec 2023 03:24:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702898696; cv=none; d=google.com; s=arc-20160816; b=XjyeY4CL+WYU/aZN/a3c4lwubNlSz7Da6ktvRl/JaKDk3B0MwagntzngJw8R6I/jYH A2H6kkLSxP6la+chbEwP98JKaRLcHtZJxqfLliNHZZY2tR8QPH4/tWPLu+4qsfFMNgTb YT2IZ9h0TY8z1hjriSWEAmEhY9Nwwy44nz1nPnCcvo2ZqtTPsG84JjMhaVYfPHXVHgWJ iHNjP7maeMISItDaTIcoB+qM5lpa1L4/KtBTKOx5DjFKSl4+CsUgxYl35REiQWHWAf9M BBvc0j0EGgUuPsZ4+N/cR4td/qaepTccPb/41HQBUm/OfKQy160SvZqvBIksPaxb3xaL 2Fyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-filter; bh=PfMb0onkMIAbXO1c9wwoJqI8g2yhCCtHs2P/GUyDOfo=; fh=OPcAXmm+lrpFrPRIOTce+GZ+Lz+PNXRffV+AHUpSvvU=; b=Gwjz1CcHtWVU+K6m+g/m86JPm98TiST8tOlr78xUODbUlUlod7sxblWHecqaGtWkUq 9RYS1rDJCIsZ56c1Iaj0lnqCLMTFi1PHDifbu8hkONZYVlWKsClNY4brAcbsqyfASvuZ e5vFi1OG8UGLqt3ZZI3+M/+g2De0gGkfegh4ydcKrCH8UVqDM5edN8po+ZsLSZDsWcvV P8U8QUR206RoP5cn6P7dnVVnj+zVV25eR3qbvqBDmQLXbbvViynM/nZobhlOfAjFmvgc g5L0oo1LAVdsAd33INaR/QYkTXAt0gM9aIO/W63/tMaBe1nUz8CYc7hrDPKVa90obdBK 5atA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@secunet.com header.s=202301 header.b=XS4eL7mR; spf=pass (google.com: domain of linux-kernel+bounces-3428-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-3428-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a59-20020a509ec1000000b0055304833e6fsi1994378edf.40.2023.12.18.03.24.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 03:24:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-3428-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@secunet.com header.s=202301 header.b=XS4eL7mR; spf=pass (google.com: domain of linux-kernel+bounces-3428-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-3428-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id AA9021F237A4 for ; Mon, 18 Dec 2023 11:24:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DA05F199CA; Mon, 18 Dec 2023 11:24:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=secunet.com header.i=@secunet.com header.b="XS4eL7mR" X-Original-To: linux-kernel@vger.kernel.org Received: from a.mx.secunet.com (a.mx.secunet.com [62.96.220.36]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1CE001A59F; Mon, 18 Dec 2023 11:24:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=secunet.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=secunet.com Received: from localhost (localhost [127.0.0.1]) by a.mx.secunet.com (Postfix) with ESMTP id CE10B206DF; Mon, 18 Dec 2023 12:19:09 +0100 (CET) X-Virus-Scanned: by secunet Received: from a.mx.secunet.com ([127.0.0.1]) by localhost (a.mx.secunet.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hQbiMYi0iXkN; Mon, 18 Dec 2023 12:19:09 +0100 (CET) Received: from mailout1.secunet.com (mailout1.secunet.com [62.96.220.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by a.mx.secunet.com (Postfix) with ESMTPS id 430B1201D5; Mon, 18 Dec 2023 12:19:09 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 a.mx.secunet.com 430B1201D5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=secunet.com; s=202301; t=1702898349; bh=PfMb0onkMIAbXO1c9wwoJqI8g2yhCCtHs2P/GUyDOfo=; h=Date:From:To:CC:Subject:References:In-Reply-To:From; b=XS4eL7mRPdHNTET2O6GIs87G50M4+FhQ6VSBnKQlyht9m58beToltcO9HHgbiOTyP bZkcGSv1TtYxPSeX3zbpZclEM9zmI4aQhANGiv/BL0P1GVFydhJYQBklksZzEX26ng GSdoI1aWhgVvCwoabyehqlVSIoHdNEIn7jYeFGlmazuHmuJMgv1NOppB57DWcKNmX0 A+TwsmlOQCEJVEinFMiXNwOCRnBdA8KxbIKLLZNKdrGllvOYWXiJi/YsQKAldYBT5s W4DShLt30II/87KynaPhGpdoHe/6U7Clf6C1yHCvR02OUqHpHye/NlmeeYP8VTRRnh 3FpFJ5neDFckQ== Received: from cas-essen-01.secunet.de (unknown [10.53.40.201]) by mailout1.secunet.com (Postfix) with ESMTP id 3CC9180004A; Mon, 18 Dec 2023 12:19:09 +0100 (CET) Received: from mbx-essen-02.secunet.de (10.53.40.198) by cas-essen-01.secunet.de (10.53.40.201) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Mon, 18 Dec 2023 12:19:09 +0100 Received: from gauss2.secunet.de (10.182.7.193) by mbx-essen-02.secunet.de (10.53.40.198) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Mon, 18 Dec 2023 12:19:08 +0100 Received: by gauss2.secunet.de (Postfix, from userid 1000) id 719583180C41; Mon, 18 Dec 2023 12:19:08 +0100 (CET) Date: Mon, 18 Dec 2023 12:19:08 +0100 From: Steffen Klassert To: Eric Dumazet CC: Zhang Yiqun , , , , , , Subject: Re: [PATCH] xfrm: Use spin_lock_bh() in xfrm_input() Message-ID: References: <20231218084252.7644-1-zhangyiqun@phytium.com.cn> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-ClientProxiedBy: cas-essen-01.secunet.de (10.53.40.201) To mbx-essen-02.secunet.de (10.53.40.198) X-EXCLAIMER-MD-CONFIG: 2c86f778-e09b-4440-8b15-867914633a10 On Mon, Dec 18, 2023 at 12:07:50PM +0100, Eric Dumazet wrote: > On Mon, Dec 18, 2023 at 9:43 AM Zhang Yiqun wrote: > > > > This patch is to change spin_lock() into spin_lock_bh(), which can > > disable bottem half in calling. If we leave this as spin_lock(), > > it may stuck in a deadlock, because the callback in bottem half in > > crypto driver will also call xfrm_input() again. > > > > Signed-off-by: Zhang Yiqun > > When was the bug added ? > We need a FIxes: tag. This looks more like a 'crypto driver' bug. xfrm_input() runs in the RX path and therefore expects to run with BHs off.