Received: by 10.223.176.46 with SMTP id f43csp461525wra; Fri, 26 Jan 2018 01:33:54 -0800 (PST) X-Google-Smtp-Source: AH8x225kiUu+MNERTar3XYImlBXitL39ONfPYFYd8EEQCsqlIKs97ebfgLYXikHAxNJ3ot36pu6L X-Received: by 2002:a17:902:7c03:: with SMTP id x3-v6mr12296288pll.355.1516959234197; Fri, 26 Jan 2018 01:33:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516959234; cv=none; d=google.com; s=arc-20160816; b=Z79BQDv6JU0GbUlY3AHVVTyKXA0Pq3ZeEz/rSRO4CqcAo7uhwYZx0R9Mas9HRLkp1y M7BC6MTyzBoTyVV+mB7mTQSiIaurrY5LYenMatrIZW2KQugfk1FwTOrGka5qyL0/UiI+ k0kWChRv/otddJUhriRrM6NpZ/UKVyYwOADcdIapMpjBuJoFuQq5rM78MNumMxuU6s8e Zhxl3FSDv2kGkE4YeSot2XyxRwgbXwS+kpHuJE6hgJHGlbJB56QQoFQQ7JNlNH9pwL4F 7ktkcd+yAHrx08K6wtRy68fsX63c8CCG0rD6KMFwAjJsQFWl/ZNrHdm7yRBoBAg7vfPL ZS/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=PKhJI1NouMEYk05+dKEtv1/hPthB0gqRUTt7BxLzOtQ=; b=QceoV4xCJFzB6u1WkBzzgnrsKn5+4q5uw0e1wZAoRxB+iRIGVqMYAw+kJuf/ZRolVl 4o6A/QnjudFx8x2ybqhVU6v384sOhx76fBsA98xQdaNYnzuMsMyoo0BWq+zAuLEkdaxm Agn7NFjhqP8YKJV2x+zzE1Kc24eDooXPe0L5PGjUrSWE4wQemya9QU1yXYgDvZg/YhDb uHN1IMTDRMiJNX39ki9ApQfXlsrqHgTHFH5xhgvXSJMjr/AxNjwp0rdRzjyAf+ggfIzn d27g5ZxG7OO0OsEZ/YHY9D+6LevOLkuSwtD1n6tmOJfzNDY+TcBvWDgibcjn7+Kd34NY nHuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=k2EufkWC; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 70-v6si3466489pla.635.2018.01.26.01.33.40; Fri, 26 Jan 2018 01:33:54 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=k2EufkWC; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752850AbeAZJcm (ORCPT + 99 others); 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 Received: by mail-pf0-f193.google.com with SMTP id y5so7934289pff.13 for ; Fri, 26 Jan 2018 01:32:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=PKhJI1NouMEYk05+dKEtv1/hPthB0gqRUTt7BxLzOtQ=; b=k2EufkWC3ChoEUDCWvMebIR3DBdxmAl1chFmjJSRPIjFYDFnVVnPGZHhF0lWV7De9L 5RU1OGYHHuYiu3LPZ6ziBIQ1xCP73T+K34KmKxkPMyoLgzfFNrKzp1xEle9ZKPn3WeXm 6lRjGP5wOuLfO9LloiGDOH+Kr2bp1csYwCrBrhGKloZMDuZGK2JTGZPoRe164ygcY8W6 Xtk8KwwBnxTddY0qJz2dB62YGLTTcX+Y/0R6aKEES+krlH7ug5GdKzeCvvdbk5KI7TX8 re2+ILqV2n4L5Kkmm8L+F9UXg3GdkiKEH2pZsqE36LAn5gTUf/QrST+lB4hHLctiG3As 53VQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=PKhJI1NouMEYk05+dKEtv1/hPthB0gqRUTt7BxLzOtQ=; b=mLYLjmRRaFo3sMMOjxpxA1k/F6erRQNySNbJcD74VF9za/BjjguLdEGB126AwxYjPd I26PoK0morioIY0Bu1hl70u8AeoutqhAwQNPjLNh5Q/9IKTBQUKFkqIDV4aTSRAosdwe n5wp3TQSieF8QxcbvLUTE3Ps1ZWzYypc9wt4Gk+N1SsuMq0+S3ArtkHNWfQDK3C6H9Nc RZKl38iZKP9qCtxHpzruIyHW4ZlSNvp8Gu8vNXhsJz+HQ4P/LDASLwGNszEXFTrKVqzc dgPy8mh3wLLDquAdWaIvhdxNrMJ9oWV3yVA0sF7zE1w0p4eyF+8+fHvUO7uXFjWgRVX2 F6VA== X-Gm-Message-State: AKwxytc7y+BqYQuJBM/lFYZzSIllzDdaOqE6T00RpjleQo1ZJWn5ux0a nLhQ/qw7CVGEgKKu74xMZsk= X-Received: by 10.99.189.18 with SMTP id a18mr6996232pgf.22.1516959159624; Fri, 26 Jan 2018 01:32:39 -0800 (PST) Received: from bai-oslab.tsinghua.edu.cn ([2402:f000:1:4413:3967:a579:e81d:66fa]) by smtp.gmail.com with ESMTPSA id v4sm7246726pgq.23.2018.01.26.01.32.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 Jan 2018 01:32:39 -0800 (PST) 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 Precedence: bulk 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