Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp499404imm; Fri, 3 Aug 2018 06:59:18 -0700 (PDT) X-Google-Smtp-Source: AAOMgpf4DYNdaBrknMQd88KEWENtz1AI1ODqLkSMkz1hfSC5ZrlDAOpWlb+9GqCH3KwOlWRleEb2 X-Received: by 2002:a17:902:2702:: with SMTP id c2-v6mr3766118plb.248.1533304758221; Fri, 03 Aug 2018 06:59:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533304758; cv=none; d=google.com; s=arc-20160816; b=v6E/roinVHs4tU6Fibca4fpLKTbyF6NinexhNwuGpgRZRcP1joDvV7fli7dNubA3e7 qT6i7lvyJn9L62MoU2SdT/4pNKeAIRy/+rjQuMVsfz+30Pd4M+g+FnYNJXN1Rr+9eC6H 1iWzSQ/HRH0Qx6H3U+sSRhIAYs2a8fJt7SdDfMvdfJsKZJRsaBzdndFtJhjIswIBcXMg HdD9tdAQnZNlOOUxo1iULamaMS/H0n68MIRWDs+eagANGcvvgApljkTuFavv2xPVM+X+ Ip//uFpiYItd84O2jn7G5W36em69aMkDL8ZfKOOC5kwDFC30OkuenMmDI1yDAReL3CBH tGWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=lMFH3PH1GjBECZD7MasqBZeiDYN0wqjwsAlrVDLzJvY=; b=of+4MMhbXUjp4LRXd7C2VNJbCq4i4Cnu7kJ5LD6z8sdDeVwePi9yGisn4+SXK9qwmz G3yAhjoOnpFOJsZaGoQTZ2742OGRR0Bu5vOxyKP53ECxQYetqnu903EeyUgqk8eJMExg PXbcg2VuCQpkP0KDjY+Ptt4pAskqPQlCiLcPur8oTL4mXP4tU9jCTaAuna4CXCxcEnrI 3i96qaPWEHRvO44AzSmavvXgdHmdMB5UhyTxK1/KDpC2AEluYZm/ngIm/gI0Wp+h2NZY PW3n+MSbAdjlg8NscSJBV+klMiUjtdIICyn/yAN/APQ06jIqWDlmG76uk1+lhBKx1puE OHkA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c22-v6si3892270plo.271.2018.08.03.06.59.02; Fri, 03 Aug 2018 06:59:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732236AbeHCPye (ORCPT + 99 others); Fri, 3 Aug 2018 11:54:34 -0400 Received: from orcrist.hmeau.com ([104.223.48.154]:36842 "EHLO deadmen.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728833AbeHCPye (ORCPT ); Fri, 3 Aug 2018 11:54:34 -0400 Received: from gondobar.mordor.me.apana.org.au ([192.168.128.4] helo=gondobar) by deadmen.hmeau.com with esmtps (Exim 4.89 #2 (Debian)) id 1flaae-0005Ai-7F; Fri, 03 Aug 2018 21:58:00 +0800 Received: from herbert by gondobar with local (Exim 4.89) (envelope-from ) id 1flaaa-00023L-Jx; Fri, 03 Aug 2018 21:57:56 +0800 Date: Fri, 3 Aug 2018 21:57:56 +0800 From: Herbert Xu To: Jia-Ju Bai Cc: davem@davemloft.net, kstewart@linuxfoundation.org, gregkh@linuxfoundation.org, tglx@linutronix.de, pombredanne@nexb.com, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] crypto: cavium: nitrox: Replace GFP_ATOMIC with GFP_KERNEL in crypto_alloc_context() Message-ID: <20180803135756.e4fy35olg3nuhtur@gondor.apana.org.au> References: <20180723081426.31780-1-baijiaju1990@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180723081426.31780-1-baijiaju1990@gmail.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 23, 2018 at 04:14:26PM +0800, Jia-Ju Bai wrote: > crypto_alloc_context() is only called by nitrox_skcipher_init(), which is > never called in atomic context. > > crypto_alloc_context() calls dma_pool_alloc() with GFP_ATOMIC, > which is not necessary. > GFP_ATOMIC can be replaced with GFP_KERNEL. > > This is found by a static analysis tool named DCNS written by myself. > I also manually check the kernel code before reporting it. > > Signed-off-by: Jia-Ju Bai Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt