All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: [PATCH] ANDROID: mm: fix call_kern.cocci warnings
Date: Thu, 01 Oct 2020 16:14:17 +0800	[thread overview]
Message-ID: <20201001081417.GA79477@5e940686e4a3> (raw)
In-Reply-To: <202010011626.CPBbKcLP-lkp@intel.com>

[-- Attachment #1: Type: text/plain, Size: 2236 bytes --]

CC: kbuild-all(a)lists.01.org
TO: cros-kernel-buildreports(a)googlegroups.com

From: kernel test robot <lkp@intel.com>

mm/page_alloc.c:5778:46-56: ERROR: function local_memory_node called on line 5883 inside lock on line 5854 but uses GFP_KERNEL
mm/page_alloc.c:5779:16-26: ERROR: function local_memory_node called on line 5883 inside lock on line 5854 but uses GFP_KERNEL
mm/page_alloc.c:5185:59-69: ERROR: function nr_free_zone_pages called on line 7792 inside lock on line 7788 but uses GFP_KERNEL

 Find functions that refer to GFP_KERNEL but are called with locks held.

Semantic patch information:
 The proposed change of converting the GFP_KERNEL is not necessarily the
 correct one.  It may be desired to unlock the lock, or to not call the
 function under the lock in the first place.

Generated by: scripts/coccinelle/locks/call_kern.cocci

Fixes: aa9752dec8d8 ("ANDROID: mm: fix up removal of vm_total_pages problem")
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/common android-mainline
head:   c1e2c674005c758817710ba1714d35185f6fa8b6
commit: aa9752dec8d8d95c0872f26c9c1935c410a8f1b8 [1313/1504] ANDROID: mm: fix up removal of vm_total_pages problem
:::::: branch date: 15 hours ago
:::::: commit date: 8 weeks ago

Please take the patch only if it's a positive warning. Thanks!

 page_alloc.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -5182,7 +5182,7 @@ static unsigned long nr_free_zone_pages(
 	/* Just pick one node, since fallback list is circular */
 	unsigned long sum = 0;
 
-	struct zonelist *zonelist = node_zonelist(numa_node_id(), GFP_KERNEL);
+	struct zonelist *zonelist = node_zonelist(numa_node_id(), GFP_ATOMIC);
 
 	for_each_zone_zonelist(zone, z, zonelist, offset) {
 		unsigned long size = zone_managed_pages(zone);
@@ -5775,8 +5775,8 @@ int local_memory_node(int node)
 {
 	struct zoneref *z;
 
-	z = first_zones_zonelist(node_zonelist(node, GFP_KERNEL),
-				   gfp_zone(GFP_KERNEL),
+	z = first_zones_zonelist(node_zonelist(node, GFP_ATOMIC),
+				   gfp_zone(GFP_ATOMIC),
 				   NULL);
 	return zone_to_nid(z->zone);
 }

      reply	other threads:[~2020-10-01  8:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-01  8:14 [android-common:android-mainline 1313/1504] mm/page_alloc.c:5185:59-69: ERROR: function nr_free_zone_pages called on line 7792 inside lock on line 7788 but uses GFP_KERNEL kernel test robot
2020-10-01  8:14 ` kernel test robot [this message]

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=20201001081417.GA79477@5e940686e4a3 \
    --to=lkp@intel.com \
    --cc=kbuild@lists.01.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.