mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jia-Ju Bai <baijiaju1990@gmail.com>
To: ed.cashin@acm.org
Cc: linux-kernel@vger.kernel.org, Jia-Ju Bai <baijiaju1990@gmail.com>
Subject: [PATCH] block: aoenet: Replace GFP_ATOMIC with GFP_KERNEL in aoenet_rcv
Date: Fri, 26 Jan 2018 17:37:14 +0800	[thread overview]
Message-ID: <1516959434-829-1-git-send-email-baijiaju1990@gmail.com> (raw)

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 <baijiaju1990@gmail.com>
---
 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

             reply	other threads:[~2018-01-26  9:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-26  9:37 Jia-Ju Bai [this message]
2018-01-27 17:48 ` Ed Cashin
2018-01-28  2:12   ` Jia-Ju Bai
2018-01-28 15:40     ` Ed Cashin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1516959434-829-1-git-send-email-baijiaju1990@gmail.com \
    --to=baijiaju1990@gmail.com \
    --cc=ed.cashin@acm.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®