Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1861016rwb; Fri, 19 Aug 2022 10:35:49 -0700 (PDT) X-Google-Smtp-Source: AA6agR5vTEx5iM6LZeNks7Pv6xfTzOn56pAEKfQWQC4Uh5uH+xhEmzh5SDryALGu0ID44n2ivWoL X-Received: by 2002:a17:902:f68d:b0:16f:2314:7484 with SMTP id l13-20020a170902f68d00b0016f23147484mr8082248plg.136.1660930549257; Fri, 19 Aug 2022 10:35:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660930549; cv=none; d=google.com; s=arc-20160816; b=BOKVCG/H8KplVQwByaLfrv6VEALD5wd3nkz6dIlvx2gJgygSVFgpBvpdRDqgg6oY8P bDw7HbURTV7ZpcECAlCAApMoxlnjINEZEH7sl1PWrD/A3/69u8cT5VhBo9U3a78Vd3Pl GIdQOx5iTvRr6+ZdW0tsIONdOTjAufgOtJ+mgsSVAr/FLthEvLgy/WCf9477Ftj1J6Hr brF1D1W3lBfgE3sCVdJmv8Hly1wpT8/8j3leuDxQgZ3CEgSJk6UJgBP4KrWJm59zi1J5 l1idke1IEupmQxIJHvbA7Sty/v0ijFjbIMPeqYF4PeDH+ZwD6PnFsual4O7OmV+oef2r V49Q== 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=6nrZoSOTF0Hl5dcKkOpCG4RVaaEHqytUJa+PVHPrrek=; b=sO2iBC5od+3EanIGDoQbYWQmlUlFbate/VNgGM0umBuAe91JeDfX/qZrerCBCP6Ij9 WGseQy6RLxrYP7ykhkP9xM2Oahhtk4OVZkB04EcV4sLCXkioRM2xl519YqCWQQQjwT+b IWcXo8bWoq3ldJjF5Mj29iH2Pmeaw13ttqpUXStwwNmlpva3ewRPPbS7QPVLlvGFpJsI AZdwkir8MivKKjSc8Dov5kfVxuwiS6o57nPx/ygFywt3Rrb81NVqRyWXWI0aTorz3wsv gAidBkuoZ2GvLsKpO0I1R+xgzZAH2SCX2HfdGXPfVd1RjIMTRofl/SXbI6IBelwMUTKo cSRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=qzV+zuP5; 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 v11-20020a1709028d8b00b0016bf7f945eesi4229334plo.371.2022.08.19.10.35.37; Fri, 19 Aug 2022 10:35:49 -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=qzV+zuP5; 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 S1352195AbiHSQVY (ORCPT + 99 others); Fri, 19 Aug 2022 12:21:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352430AbiHSQQg (ORCPT ); Fri, 19 Aug 2022 12:16:36 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB48B108F1C; Fri, 19 Aug 2022 08:59:52 -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 B150A6178A; Fri, 19 Aug 2022 15:59:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BAEA9C433C1; Fri, 19 Aug 2022 15:59:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660924791; bh=qVykEADmkqDd7dMui6E8TD0P8QHRoDILfpFsL3tT9i4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qzV+zuP5sM6tL2OtGmb5RxjNV0ozar9ozYVl5miImlTPGuA1pcFW8uUvTeBksEg/r AOmAYFduCgOsrLpJi3pELN6Df0obxenSpLhPdP2j+8YJdRv/bjU+fA/DIPOfGg7A9N uUXxG5ADMRYBgnF+BsdHkBCYoZD+pT6BpVPNVf5A= 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.10 254/545] crypto: hisilicon/hpre - dont use GFP_KERNEL to alloc mem during softirq Date: Fri, 19 Aug 2022 17:40:24 +0200 Message-Id: <20220819153840.721711207@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220819153829.135562864@linuxfoundation.org> References: <20220819153829.135562864@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 a87f9904087a..90c13ebe7e83 100644 --- a/drivers/crypto/hisilicon/hpre/hpre_crypto.c +++ b/drivers/crypto/hisilicon/hpre/hpre_crypto.c @@ -210,7 +210,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