Content-Type: multipart/mixed; boundary="===============2453408874067434118==" MIME-Version: 1.0 From: Julia Lawall To: kbuild-all@lists.01.org Subject: [PATCH] ANDROID: mm: fix call_kern.cocci warnings (fwd) Date: Thu, 01 Oct 2020 16:46:11 +0200 Message-ID: List-Id: --===============2453408874067434118== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Just passing this along. I don't know if it is a real problem. Check the call sites in the same file. julia ---------- Forwarded message ---------- Date: Thu, 1 Oct 2020 16:14:17 +0800 From: kernel test robot To: kbuild(a)lists.01.org Cc: lkp(a)intel.com, Julia Lawall Subject: [PATCH] ANDROID: mm: fix call_kern.cocci warnings CC: kbuild-all(a)lists.01.org TO: cros-kernel-buildreports(a)googlegroups.com From: kernel test robot mm/page_alloc.c:5778:46-56: ERROR: function local_memory_node called on lin= e 5883 inside lock on line 5854 but uses GFP_KERNEL mm/page_alloc.c:5779:16-26: ERROR: function local_memory_node called on lin= e 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 li= ne 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 --- tree: https://android.googlesource.com/kernel/common android-mainline head: c1e2c674005c758817710ba1714d35185f6fa8b6 commit: aa9752dec8d8d95c0872f26c9c1935c410a8f1b8 [1313/1504] ANDROID: mm: f= ix 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 =3D 0; - struct zonelist *zonelist =3D node_zonelist(numa_node_id(), GFP_KERNEL); + struct zonelist *zonelist =3D node_zonelist(numa_node_id(), GFP_ATOMIC); for_each_zone_zonelist(zone, z, zonelist, offset) { unsigned long size =3D zone_managed_pages(zone); @@ -5775,8 +5775,8 @@ int local_memory_node(int node) { struct zoneref *z; - z =3D first_zones_zonelist(node_zonelist(node, GFP_KERNEL), - gfp_zone(GFP_KERNEL), + z =3D first_zones_zonelist(node_zonelist(node, GFP_ATOMIC), + gfp_zone(GFP_ATOMIC), NULL); return zone_to_nid(z->zone); } --===============2453408874067434118==--