From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752864AbeAZJcm (ORCPT ); Fri, 26 Jan 2018 04:32:42 -0500 Received: from mail-pf0-f193.google.com ([209.85.192.193]:46357 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752511AbeAZJck (ORCPT ); Fri, 26 Jan 2018 04:32:40 -0500 X-Google-Smtp-Source: AH8x227TEDgJTghE4zvxRStok7zDkOF03pxzBLsaMxlfjDLpwosfueuycuTE1x7OCmZdDCCme3c14A== From: Jia-Ju Bai To: ed.cashin@acm.org Cc: linux-kernel@vger.kernel.org, Jia-Ju Bai Subject: [PATCH] block: aoenet: Replace GFP_ATOMIC with GFP_KERNEL in aoenet_rcv Date: Fri, 26 Jan 2018 17:37:14 +0800 Message-Id: <1516959434-829-1-git-send-email-baijiaju1990@gmail.com> X-Mailer: git-send-email 1.7.9.5 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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