Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2882054rwb; Mon, 15 Aug 2022 13:13:58 -0700 (PDT) X-Google-Smtp-Source: AA6agR7PoGR0J0YK41Mzj6w70jPiTZZXWekPdCRdFVhwfGOX/l3fpuW+zh07jXXFbDLMcQfTBzEM X-Received: by 2002:a17:906:216:b0:711:f623:8bb0 with SMTP id 22-20020a170906021600b00711f6238bb0mr11743405ejd.174.1660594438502; Mon, 15 Aug 2022 13:13:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660594438; cv=none; d=google.com; s=arc-20160816; b=gDMUAEtSsC5v8l5cKtzq1oeVIxQA2YqWauuvrt4rQwrn7j6pLHNcycXbEG30VjOvQ4 Sg3YDcgoWRzurw3RZrgtZjmRDVrrfoqe1IF00r9NPMr2HaWxCl/LjQyS03KVfuJxZI6D Y7RrDmr3JauhkRgciFoN4Yok9OJGPn8Mfn/m7XQceRzleNEeyCn7ZXl3d62JdBcOT+IB dnVKQx/s+ZUmu0RyUrnTRXqVxgvN9nSSHu5DwuqlUFoEvCbMeSRhwj8p59iIbVHoY2Od dg8Yb+Q7eRwYtNuojNtTv4eidxhwZlfIQ+gU8XQt0Vf1EsvLWFkDv22KNK96eopId3AK 4KRg== 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=H+qWGaxMlJ+NCNgnulAxBh5llZOs2I2qplpPZmVrY0c=; b=R1pjQxt7Z/wL5lF1RWZrsZj4JQZTR32BXT8w7m+7h/pMFSlO8PMAOvR8ICWUGbOqLS j0eOvKFpI+fUuhblS2eLLRbxuNJ30NQrNxsQc1B2SKny6q5SN90MHiDTALUZmJjottWH qBupxIH6YVfblBFUx3pgh+mYVbvwn47bvZDxKpt3XiqZuivpGdC65y0rsBUCPxO1rKA0 6WHAIZB9bgRvnLojhVtNNeh0mFXavwo9Dp3+cdPF0hCCIWNe7HlsnwOQ+qvAhAtzQaPU sJlw9HUGQSErnPuZAPy0ax9j520J2dhUlzY810XkRbbkOlgmcTg3E2VD9TmgX6JPl6vx 49vA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=FB0E5kTL; 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 mm26-20020a170906cc5a00b00732b3af4684si7793450ejb.163.2022.08.15.13.13.32; Mon, 15 Aug 2022 13:13:58 -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=FB0E5kTL; 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 S239824AbiHOTDG (ORCPT + 99 others); Mon, 15 Aug 2022 15:03:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48574 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245298AbiHOS5L (ORCPT ); Mon, 15 Aug 2022 14:57:11 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 70BCE49B51; Mon, 15 Aug 2022 11:32:20 -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 97E57B8107A; Mon, 15 Aug 2022 18:32:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E1FB6C433D6; Mon, 15 Aug 2022 18:32:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660588337; bh=70ihzHdaa0U9BhqBj0wzWZsZcC9BnrOnx85aHESZwOY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FB0E5kTLqmRaTHjsS1Br/DdTdAjruwVJjB9NLAYaMCt95WMQHI3cFWL9RnkpwgT7p aW/2qD3w8UET20fX+IkWUVxPXcvQyYHjUZKHNsJ1HOB96DgdqEhKEgJ1aXidMRcHo4 yb429XjOHDdvz6nbMQmsT3FFJztP00olt7V4RfDo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Zhengchao Shao , Herbert Xu , Sasha Levin Subject: [PATCH 5.15 371/779] crypto: hisilicon/hpre - dont use GFP_KERNEL to alloc mem during softirq Date: Mon, 15 Aug 2022 20:00:15 +0200 Message-Id: <20220815180353.125040549@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180337.130757997@linuxfoundation.org> References: <20220815180337.130757997@linuxfoundation.org> User-Agent: quilt/0.67 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: Zhengchao Shao [ Upstream commit 98dfa9343f37bdd4112966292751e3a93aaf2e56 ] The hpre encryption driver may be used to encrypt and decrypt packets during the rx softirq, it is not allowed to use GFP_KERNEL. Fixes: c8b4b477079d ("crypto: hisilicon - add HiSilicon HPRE accelerator") Signed-off-by: Zhengchao Shao Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin --- drivers/crypto/hisilicon/hpre/hpre_crypto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/hisilicon/hpre/hpre_crypto.c b/drivers/crypto/hisilicon/hpre/hpre_crypto.c index 7ba7641723a0..4062251fd1b6 100644 --- a/drivers/crypto/hisilicon/hpre/hpre_crypto.c +++ b/drivers/crypto/hisilicon/hpre/hpre_crypto.c @@ -252,7 +252,7 @@ static int hpre_prepare_dma_buf(struct hpre_asym_request *hpre_req, if (unlikely(shift < 0)) return -EINVAL; - ptr = dma_alloc_coherent(dev, ctx->key_sz, tmp, GFP_KERNEL); + ptr = dma_alloc_coherent(dev, ctx->key_sz, tmp, GFP_ATOMIC); if (unlikely(!ptr)) return -ENOMEM; -- 2.35.1