Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1022539pxb; Wed, 6 Apr 2022 06:58:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxlsStpptXSFehr1+MR6ap5Cma0oacOuDgzDXWAZuSnJWTavu689coBeUiMJNofjes1JTcH X-Received: by 2002:a63:4382:0:b0:383:38ae:bb23 with SMTP id q124-20020a634382000000b0038338aebb23mr7307967pga.148.1649253518645; Wed, 06 Apr 2022 06:58:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649253518; cv=none; d=google.com; s=arc-20160816; b=wLldbywG1dbx1VXni2s1KWBbHTNYi35wpPnjNfI65Palcv77bYUvPpS4clWMR2mmbK dWAB6fdVYEvIqHmb0CQJcZ1hJbTQXFPv0/PD/fO8N7+E1WHXOuaWFRl9A9AZAek/wXbU N7FOgaqQ4lbVD3mCfl7Bsn9axYOjYgDN827J3IuojxlipAgCUqm39tZB1XjzGtleaeMZ EUjlkoymd/OaQ5r2aP8Ve/c0did1pG4pz3C/i4hSaIBh4KrSoU3dOhxbAuIrKwAnwaxw SKSseYzXmPKdg6V+tw2NRAVu2g16aBccQk18BBuYMRwvD5A9t6lGYlrO/0wyEJ22DfCZ NRRA== 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=eC1/56+F8GkxiFdk9JhAT1U7VVVF5WcyRCsKhl53n7A=; b=VqK7VaZlEV8+nY/UP8eIGVTVhL06K88w9Z1Z+LqjU5pPjstmd/8fbSmsxm0HHdYmo0 UNok6dZPyNoagfBr3DVUGgVuGYX07+2TnZXPwNKBT40YLBoAUI/v7hORb6DihVk8Cg/V q6KtCWFO2G6DX93GYB0IEw4esxaTOnN17LQzIUDoON27wjrc7JLZ+EYhwxCm3eCmtNPr 2KtEM9q6Q6U7DgIW2ikm8FQofHoTvnd/fhSZsMgx78zsBI3Q59Bg+mOcJPmNCEBH33Uh iSGCv+QrrqnWD0WROpqeuDK2/szT8EQGprFCL90zTkOuxY/fVivK5+FVv0HVEGScW4RD SbTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=cgWlvzYe; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id e13-20020a17090ab38d00b001ca77ffdaa4si4810334pjr.96.2022.04.06.06.58.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 06:58:38 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=cgWlvzYe; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A06431864BD; Wed, 6 Apr 2022 04:50:50 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1835610AbiDFAc2 (ORCPT + 99 others); Tue, 5 Apr 2022 20:32:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60608 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1356177AbiDEKXM (ORCPT ); Tue, 5 Apr 2022 06:23:12 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C3A54BA33E; Tue, 5 Apr 2022 03:07:28 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 834FCB81BC0; Tue, 5 Apr 2022 10:07:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E5BAEC385A2; Tue, 5 Apr 2022 10:07:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649153246; bh=E7YpLm0vNAAryXZwsLRjt7m1vsldvGR95nHASoIBHBQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cgWlvzYeqHUS9LTkbrF3JxZy3Yvm7DfUVwXxgzkFGLMh2AatFhCkbhz+aI1nsVtEL I2m7VJOCx0o+lsb5HIOKP4hTtrqhEyUMe/YjEEP7cHFc2bzPjtpoPKJUrNkVLgnLv7 nu3xG8mY32DYRh3h1fBiLNePuO2Sgyu8BHzWc82w= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Corentin Labbe , Herbert Xu , Sasha Levin Subject: [PATCH 5.10 153/599] crypto: sun8i-ce - call finalize with bh disabled Date: Tue, 5 Apr 2022 09:27:27 +0200 Message-Id: <20220405070303.395735329@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070258.802373272@linuxfoundation.org> References: <20220405070258.802373272@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Corentin Labbe [ Upstream commit f75a749b6d78aeae2ce90e14fcc4b7b3ba46126d ] Doing ipsec produces a spinlock recursion warning. This is due to not disabling BH during crypto completion function. Fixes: 06f751b61329 ("crypto: allwinner - Add sun8i-ce Crypto Engine") Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin --- drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c | 3 +++ drivers/crypto/allwinner/sun8i-ce/sun8i-ce-hash.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c index 33707a2e55ff..64133d4da3d5 100644 --- a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c +++ b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c @@ -11,6 +11,7 @@ * You could find a link for the datasheet in Documentation/arm/sunxi.rst */ +#include #include #include #include @@ -280,7 +281,9 @@ static int sun8i_ce_cipher_run(struct crypto_engine *engine, void *areq) flow = rctx->flow; err = sun8i_ce_run_task(ce, flow, crypto_tfm_alg_name(breq->base.tfm)); + local_bh_disable(); crypto_finalize_skcipher_request(engine, breq, err); + local_bh_enable(); return 0; } diff --git a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-hash.c b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-hash.c index 4c5a2c11d714..62c07a724d40 100644 --- a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-hash.c +++ b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-hash.c @@ -9,6 +9,7 @@ * * You could find the datasheet in Documentation/arm/sunxi.rst */ +#include #include #include #include @@ -412,6 +413,8 @@ int sun8i_ce_hash_run(struct crypto_engine *engine, void *breq) theend: kfree(buf); kfree(result); + local_bh_disable(); crypto_finalize_hash_request(engine, breq, err); + local_bh_enable(); return 0; } -- 2.34.1