Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp660162pxb; Tue, 5 Apr 2022 17:42:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyrfQnXDVLFT/Kt3psKTWgqwmskZIeNQabtPMe2jBAK054XGgOBhG4fBNw8LdfQWwxkPXpr X-Received: by 2002:a17:906:d789:b0:6e0:bdd5:a884 with SMTP id pj9-20020a170906d78900b006e0bdd5a884mr5862095ejb.201.1649205646375; Tue, 05 Apr 2022 17:40:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649205646; cv=none; d=google.com; s=arc-20160816; b=xWwH01qIREvNZUJAEt+tsQ7sweS2yxHgKx4ZmEfl76FH2DCgC31SE/I0TZgFVJg0XY cx0uEQiwQD3x2cLRIUoRKJIFUYHBeOtzrIIVjbjqEOwqHy+N7VHjai+0RMQnXs/cL6zT 9wshB3Gi1vgER4jso/uthRmzLfKuG4VV5QY6B9tvAgEt6lci7n0oAWCdiwiN9rFTjy3e ksqp3euT5pX5Bb/sUH0fYHijNrReINL1uRR3mjm94NMmVAg84Ge0WDH/Zhdbvck1GqYP 8BsFEkLnQ3OXLIPQPVB/7PFoWEnMFEW13B/IYAYtABL9r8WdbWM4toLgR63eMfle9cC+ ghQg== 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=Z6kwiNyB+sDV6Mjwr/ZATPTb1DioxuiuRYUPMMckfec=; b=QaiA3W0Tux5xkf/mkrMzfr9ETfL1Q/e1BpkFbdsKzyebN+kdGcodzy6OIAGlMNGiw+ 7LgLv7GWsJE4X2v2EyRNEvtcQVv5d7FIarmlx8UKpTvMQ+1xp7Tj4VLPQSjEf5Bfbh3G /4B5a6I0bS9GXjxAdVcno9jsUSpIPH7Zadt9OcWDQpeOdzqCU6tZYS1B6Y5v8K5nFmGt lel9XogS6joHkCduVNyHO/q1h2mwmirHLpoaAbPjCF01YKVbjkWo7c9modp0VR+RTHHu cz4VweYhYBtFbPxmPuCCU7gQjPgt02RNlwTA9XQbmFF90d+HGQjI0A/WA9+oGbCejFS5 6RMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=oywcZXEG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k18-20020a17090627d200b006e7f5b1fb91si5392491ejc.370.2022.04.05.17.40.19; Tue, 05 Apr 2022 17:40:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=oywcZXEG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237764AbiDEPC6 (ORCPT + 99 others); Tue, 5 Apr 2022 11:02:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345059AbiDEJm6 (ORCPT ); Tue, 5 Apr 2022 05:42:58 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83399BF973; Tue, 5 Apr 2022 02:28:26 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 16CAA616B2; Tue, 5 Apr 2022 09:28:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1E261C385A0; Tue, 5 Apr 2022 09:28:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649150905; bh=a0d4t+sXv4Wr9/cCzVEovrbCFrTvir/oyRFggdahnEg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oywcZXEGrBkJ36K4YqT+HRL50A+GR0gXMcLJjmQycX4oSIBakDUZIlVZloPmc9iVO J1KQbd5b6v91ISnLpy4r7+QVuC55zy1h4yjXhEJs7YDBO26AWPJ2UdTSXWkBS38qCx IgjZLr+NfYmPg+EXFw6ez3YBvoFyueJSunkUJufo= 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.15 224/913] crypto: sun8i-ce - call finalize with bh disabled Date: Tue, 5 Apr 2022 09:21:26 +0200 Message-Id: <20220405070346.572336359@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070339.801210740@linuxfoundation.org> References: <20220405070339.801210740@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=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 54ae8d16e493..35e3cadccac2 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 @@ -283,7 +284,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 88194718a806..859b7522faaa 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 @@ -414,6 +415,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