Received: by 10.223.176.5 with SMTP id f5csp808074wra; Sat, 27 Jan 2018 10:12:36 -0800 (PST) X-Google-Smtp-Source: AH8x227iNENYhJdqb9cqDA+HDYg9+kZ46HGfdA4n9zdyzvm3453SU2pMbHFk3H0GwkbibsWJF4jf X-Received: by 2002:a17:902:7483:: with SMTP id h3-v6mr7496210pll.308.1517076756499; Sat, 27 Jan 2018 10:12:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517076756; cv=none; d=google.com; s=arc-20160816; b=vZFrxe8UZIqFrsPqYi1pCBUiFzxoYDJwCEaRYZpAD9fjcv0CC79EY6afTCcaylDEWU Z/WI/0vKOmx6zWAMn9FKfLn+C7oUbxaeJnNRtms/zxsud/vN4z3otr8A9dA1pddDg2F2 y4ggQgvUk9v5f6k6hrgKrJFZPmFZCDfs7d2sybOiNL43Bxsv9Q7K/o5fV6N2VOITtvvR sjEdo8UpC0hawjQlNbDO3zZX+Z7WOqI5YW4foauIVVJmk/vl7xhV4v3/Js3RF9ckqHiW FNBdB/YEh6f+N81NtqqJHylwvCulaSJZKxIAYyej2LLYv/4Ry4uJ8isdbToX0LBWbrTk aCmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:arc-authentication-results; bh=mdqmMD80mSr161WbAZGCYgW5LVcp081C3WeSgiVJ6fM=; b=hjBo4zMSDUnKR/jgkbPvZPzMTL2ZufxD0nNw/KeJo9TmAh9IZFv36PqbfWhEdYhsHJ Yt+/WynW5RuQd4D3HT77hvtSS+OV4YktME7mDtw0xQrokMefIAHB36M9zbCQ3cMGC8HZ bJBZaf2BdXdvoESkTvzxxnJi6X9GnnTHUGgwHfJjbLA3T0CGzLVFB7s1BdFuo2lKh7YS 1cBMrCUaKnpg0HTaLm5zWe4RqS6PnwhzUU+JVQbaJMWuPmpfshO7zgDCVfDX9sWFOsx5 aH5n+gJlX6znU97pwMx0G0QaACho/sAZYfWg1bJuiciTBfpMZVPUJQ0pBUiCuf63o9Pk p4Bg== 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 n80si8327577pfi.380.2018.01.27.10.12.09; Sat, 27 Jan 2018 10:12:36 -0800 (PST) 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 S1753230AbeA0SLh convert rfc822-to-8bit (ORCPT + 99 others); Sat, 27 Jan 2018 13:11:37 -0500 Received: from qproxy6-pub.mail.unifiedlayer.com ([69.89.23.12]:47257 "EHLO qproxy6-pub.mail.unifiedlayer.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752773AbeA0SLf (ORCPT ); Sat, 27 Jan 2018 13:11:35 -0500 X-Greylist: delayed 1370 seconds by postgrey-1.27 at vger.kernel.org; Sat, 27 Jan 2018 13:11:35 EST Received: from cmgw4 (unknown [10.0.90.85]) by qproxy6.mail.unifiedlayer.com (Postfix) with ESMTP id 7EAD2140576 for ; Sat, 27 Jan 2018 10:48:41 -0700 (MST) Received: from box320.bluehost.com ([69.89.31.120]) by cmgw4 with id 3Voe1x0092bWBD901VohtT; Sat, 27 Jan 2018 10:48:41 -0700 X-Authority-Analysis: v=2.2 cv=G85sK5s5 c=1 sm=1 tr=0 a=6lV6tj8ir7tGSl/9xQZNPA==:117 a=6lV6tj8ir7tGSl/9xQZNPA==:17 a=kj9zAlcOel0A:10 a=RgaUWeydRksA:10 a=pGLkceISAAAA:8 a=d-1soTCrNATEaA6rxxAA:9 a=CjuIK1q_8ugA:10 Received: from mobile-166-173-248-199.mycingular.net ([166.173.248.199]:37820 helo=[10.209.179.144]) by box320.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1efUaj-004IkY-Vh; Sat, 27 Jan 2018 10:48:38 -0700 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: [PATCH] block: aoenet: Replace GFP_ATOMIC with GFP_KERNEL in aoenet_rcv From: Ed Cashin X-Mailer: iPhone Mail (15C202) In-Reply-To: <1516959434-829-1-git-send-email-baijiaju1990@gmail.com> Date: Sat, 27 Jan 2018 12:48:35 -0500 Cc: ed.cashin@acm.org, linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8BIT Message-Id: <219E4594-88B1-4501-A897-9A4B3296163B@cashinworks.com> References: <1516959434-829-1-git-send-email-baijiaju1990@gmail.com> To: Jia-Ju Bai X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box320.bluehost.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - cashinworks.com X-BWhitelist: no X-Source-IP: 166.173.248.199 X-Exim-ID: 1efUaj-004IkY-Vh X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: mobile-166-173-248-199.mycingular.net ([10.209.179.144]) [166.173.248.199]:37820 X-Source-Auth: nobody X-Email-Count: 0 X-Source-Cap: bm9ib2R5Oztib3gzMjAuYmx1ZWhvc3QuY29t X-Local-Domain: no Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If the tool cannot tell whether the protected state is manipulated by *another* piece of code called in atomic context, then it's insufficient. > On Jan 26, 2018, at 4:37 AM, Jia-Ju Bai wrote: > > After checking all possible call chains to aoenet_rcv(), > my tool finds that aoenet_rcv() is never called in atomic context, > namely never in an interrupt handler or holding a spinlock. > Thus GFP_ATOMIC is not necessary, and it can be replaced with GFP_KERNEL. > > This is found by a static analysis tool named DCNS written by myself. > > Signed-off-by: Jia-Ju Bai > --- > drivers/block/aoe/aoenet.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/block/aoe/aoenet.c b/drivers/block/aoe/aoenet.c > index 63773a9..d5fff7a 100644 > --- a/drivers/block/aoe/aoenet.c > +++ b/drivers/block/aoe/aoenet.c > @@ -138,7 +138,7 @@ static int __init aoe_iflist_setup(char *str) > if (dev_net(ifp) != &init_net) > goto exit; > > - skb = skb_share_check(skb, GFP_ATOMIC); > + skb = skb_share_check(skb, GFP_KERNEL); > if (skb == NULL) > return 0; > if (!is_aoe_netif(ifp)) > -- > 1.7.9.5 >