Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3060872rwb; Mon, 15 Aug 2022 17:09:46 -0700 (PDT) X-Google-Smtp-Source: AA6agR6N7uGL2KWA0mG94BM0RPB4uoMVH+u7WPltRHyEvK9BgazTp13SoTv2EHRKpzHBl0JSTWNc X-Received: by 2002:a17:906:e8f:b0:730:9480:9728 with SMTP id p15-20020a1709060e8f00b0073094809728mr11442600ejf.99.1660608585872; Mon, 15 Aug 2022 17:09:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660608585; cv=none; d=google.com; s=arc-20160816; b=ArYTKCUop3r0uUFfl7T6VSl0gHQKja/o0TjeN+pj4LL7gj2N84TkSskrykke9rKJ3P HxP+uWd0rDgg5A2ZcIn+92btaDDeOaC86xbcMy5WVcthw29Xi1cH4Q94CpcbgbbcmZcZ Aac3MMcXQBUHL1+V6cktfVaeP/Vtvh5SoZ35pIoVvygCnXM6Ch70nnhcjYugGCZZ4N5+ vnrxIEcekrNGx/QfzKkReeTtlAJcEcv/E5EJtkahrqnqwfPKujaAy/7BK5SSW7RSctDA zdrZpHLKhMBzn5l3wxnXj0yQB/PlWKmeQMebZmwZ1AD+/Ckn3MOkJoTJSaaWhunyr9hZ yHig== 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=0yDOotos6VjayTm77VjqtX2iAtDr/N3ELcY1XuaVN5Q=; b=gPN2jEplmC/wtsdnbfQzHTrWC1J+XZ5x2n4MzCiNNUaTnMcMzj0nH6CDA4q6c/3xzE wmH1M6MVzs392S7JyA3cUAPJDfI7Srn71qxf2x1pVS+JfpO0LJoCUNsoL3TNqAZNnr6l mFJ3VREAm1IcxmWeUpQv1/5YFNgrsh57IxOI1oNltkgyDTxIUFF1UrjuofXCmF55Knrz 08yUNF4K4x32YWL172yLUXPhzCDazen6Oe0U3dH/6lt5d1uru05YSTkRPuBUxORNr8Us DJqafFZgmUiTVyOiOEjXhp8ytlghliqED3iz3cQnGS2TheBeyBY19x9nMzEb1aaUW+Kt dX4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=tI9V4fHZ; 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 g4-20020a1709065d0400b0073100e36dccsi8504127ejt.316.2022.08.15.17.09.16; Mon, 15 Aug 2022 17:09:45 -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=tI9V4fHZ; 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 S1352376AbiHPAEp (ORCPT + 99 others); Mon, 15 Aug 2022 20:04:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34162 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354642AbiHOXzC (ORCPT ); Mon, 15 Aug 2022 19:55:02 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7D20F13D22; Mon, 15 Aug 2022 13:19:42 -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 2755C60E73; Mon, 15 Aug 2022 20:19:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 142C7C433C1; Mon, 15 Aug 2022 20:19:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660594780; bh=bjh2T3gtOlTJmqSHRYkYkNlxRdKEcz/kD+u8jQqUFdg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tI9V4fHZCnghRXLxLeK8P5dCphLJjh3mNOxfO/PW7d0BHAVFIROdD+LPFYk4Afz9c mXOGBYNNh4lfiyIUYZjCFQOkm/S/9jsvceEeIi6pLVcyBsHEuU9Pmq2SgXK4xXnpPT l284U6euxzlMYP8pC09DVfLbrgroVrdOSRf/wSqo= 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.19 0557/1157] crypto: hisilicon/hpre - dont use GFP_KERNEL to alloc mem during softirq Date: Mon, 15 Aug 2022 19:58:33 +0200 Message-Id: <20220815180501.891751230@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@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 97d54c1465c2..3ba6f15deafc 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