Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3020770rwb; Mon, 15 Aug 2022 16:17:54 -0700 (PDT) X-Google-Smtp-Source: AA6agR5hlr8qUXxGHsyQ6y92aqxxwXJKY4docUaS9YR9KauLiAekPhfnkwQQWg9HgovPhSC1nYvZ X-Received: by 2002:aa7:da92:0:b0:43c:c5af:d5c9 with SMTP id q18-20020aa7da92000000b0043cc5afd5c9mr16801011eds.10.1660605474497; Mon, 15 Aug 2022 16:17:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660605474; cv=none; d=google.com; s=arc-20160816; b=R9t8tQHnAd2BuOg6H9rUvXmbHIeUwqMYHD0bLGwAT8qG5WxxRl5MCNprVUj3YGKIdo 1btouKtTg8aECevqBZVSzDm3mXpmTzmmOgw8BmQ3JVutjs76/pH8IJHJeYU0KKZm9yJV 7deLgguVmIMeZF+suP94UtbFlFGYRXXhetQJXsKdOuagRHnQ6zmuJzusa/M3LIk4Ry6n voK/xIne5Tqr2W1xmV9AtEz6UVK2IIb8X1C+3oRbzDDzPIaFMyINRqRMoYn/+mc534KP mxJsAXsv4oG00XbqdTm5Wtl7vnIs2chyruDfcWhpPFNNakzdAtTi76G7/dfGh5H1TXGD lqSg== 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=TOcKEQZR+iStMMrMyEO0RdxQB2cosFBmFNyDiKzY+sobGWlZk0/fWKT7+95mYUfMST AajE5yZg+fKo8juylTPOCPbdGy4FOjKUPC/AJzc8nbR4PK31vw/99CkQtFbBqRgFjH2K /Om7iJS9zFPomDTtXkTsEZVkV2ICvKF4ZFCoQywSdw0dIlzk8oR5/XIeDc0tYVW05tSR PvLwIV0YiZdkggW+Y8qPSDC+3A0deod9dhh+xi8K/5SgXc0WWBGbYFZ1Pffgj5WJwavu F1wZAcyR6OCVgKo20vqWOfsQMUZTZvJwtSwj6OGkBw4TRQs8Gn3DA+iwVeiEB8XxS4E2 ShNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=xs+fFEqH; 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 r8-20020a05640251c800b00440d768eb42si10289894edd.89.2022.08.15.16.17.28; Mon, 15 Aug 2022 16:17:54 -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=xs+fFEqH; 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 S1345939AbiHOVYN (ORCPT + 99 others); Mon, 15 Aug 2022 17:24:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345202AbiHOVRl (ORCPT ); Mon, 15 Aug 2022 17:17:41 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6EE1258B62; Mon, 15 Aug 2022 12:20:59 -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 67CE2B810A3; Mon, 15 Aug 2022 19:20:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9FD6FC433D6; Mon, 15 Aug 2022 19:20:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660591256; bh=bjh2T3gtOlTJmqSHRYkYkNlxRdKEcz/kD+u8jQqUFdg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xs+fFEqH7mx+DZDfSvRq1J65QBWXElV5AJhgLL/XLgqcQqt1e+p1Zq6ElTf23H2UO 6IxrpJpdJICpx6t+jJ3d8IaQaG/LGY2wpCKk+UHwTANDDy320x8XkfsXKQqvGw+bdl lQkjl9DyZ7P4DvICSt96UId/yS72DTG+AmL7NPeY= 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.18 0521/1095] crypto: hisilicon/hpre - dont use GFP_KERNEL to alloc mem during softirq Date: Mon, 15 Aug 2022 19:58:40 +0200 Message-Id: <20220815180451.107903705@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180429.240518113@linuxfoundation.org> References: <20220815180429.240518113@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