Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp499909imm; Fri, 3 Aug 2018 06:59:49 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdcXK3E3zaHjMrlBivyZvNEBpHnQ1WWScCXWrdIaXbmkaPzJ7SPcG/wOgQtmt3rU8+dM+2h X-Received: by 2002:a63:735d:: with SMTP id d29-v6mr3963596pgn.156.1533304789323; Fri, 03 Aug 2018 06:59:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533304789; cv=none; d=google.com; s=arc-20160816; b=BgfbpRiOJT3PQ8giiPZvZhXnMcjt0oCRP6XZHA2VplcjWoyZ48QEDKiKwEMnCjpVZ4 kyp7wFgd3cUKjaCYMQ1iotnkYHWhj35554o4v/fxbo4FtcmXpukLEGsQdTPs92Kv4COO zlupMuDKMwa0TknD1FzXf+Q5p/bxHO6sLATb4Yvcma4sbX7HlFYQJRLY0YWbZoMfjj1I GwEpJ/CSRjvapKVAnoOXf43ScBVW3PvqMZqPuVg9s78g2mFYF5FtE7L4KsPeiH15pmZE 2vRFuA4LA800VLF3WmjXoIDWRktdhXzr24PGgimvkHWjWyGBEz1I2UVFeansbCZH3AbF SPBw== 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=iAIBvIdhj85jpnWNERXbFV09s9jCGJASC8WKnwjU+Ho=; b=JnDJtZS4hRuuNES0BD6gNJ8/puzkQ8ywYALBuAA6lkcw83tQ2REjwGfn9h22FvlMSN ShzAT0ZwZb1JBj7/FHwkvpCV6P10Tx2J0EIWK32/o9tmDpCvKZHSEbAmKjtu5bCLa3Sh Wxh6WSLrgd2EtRCxQJ3zbMDWGi7/iuMCTccEelgWOgC0v79ewNXCX8y1EjSqUuJLPwaH RJ5D6mr/a3vDiQmc1xAoSBS/TDgM3++RLnbsocSwlqkuKceXKCNOnNWpQY0gzsLhHzbJ F378kBVeP1/MgLF5XQulJNsXrL94WfFVqVzwC8LDZ6fH5qhRvWKdLNj2wVla0Q3d3MHR HaEw== 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 i11-v6si6035722pfe.145.2018.08.03.06.59.34; Fri, 03 Aug 2018 06:59:49 -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 S1732325AbeHCPy6 (ORCPT + 99 others); Fri, 3 Aug 2018 11:54:58 -0400 Received: from orcrist.hmeau.com ([104.223.48.154]:36866 "EHLO deadmen.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732301AbeHCPy6 (ORCPT ); Fri, 3 Aug 2018 11:54:58 -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 1flaav-0005Cw-Fl; Fri, 03 Aug 2018 21:58:17 +0800 Received: from herbert by gondobar with local (Exim 4.89) (envelope-from ) id 1flaas-00023n-HR; Fri, 03 Aug 2018 21:58:14 +0800 Date: Fri, 3 Aug 2018 21:58:14 +0800 From: Herbert Xu To: Jia-Ju Bai Cc: mst@redhat.com, jasowang@redhat.com, arei.gonglei@huawei.com, davem@davemloft.net, virtualization@lists.linux-foundation.org, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] crypto: virtio: Replace GFP_ATOMIC with GFP_KERNEL in __virtio_crypto_ablkcipher_do_req() Message-ID: <20180803135814.452fdflcronacrjr@gondor.apana.org.au> References: <20180723084346.16488-1-baijiaju1990@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180723084346.16488-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:43:46PM +0800, Jia-Ju Bai wrote: > __virtio_crypto_ablkcipher_do_req() is never called in atomic context. > > __virtio_crypto_ablkcipher_do_req() is only called by > virtio_crypto_ablkcipher_crypt_req(), which is only called by > virtcrypto_find_vqs() that is never called in atomic context. > > __virtio_crypto_ablkcipher_do_req() calls kzalloc_node() 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