From: kbuild test robot <lkp@intel.com>
To: "Uladzislau Rezki (Sony)" <urezki@gmail.com>
Cc: kbuild-all@01.org, Andrew Morton <akpm@linux-foundation.org>,
Linux Memory Management List <linux-mm@kvack.org>
Subject: [linux-next:master 3880/3985] mm/vmalloc.c:1076:21: sparse: sparse: incorrect type in initializer (different address spaces)
Date: Sat, 1 Jun 2019 05:13:45 +0800 [thread overview]
Message-ID: <201906010541.Xrg8P8Mi%lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 3c09c1950c8483eeeb4bf9615ecdcec7234c6790
commit: 1203396fa708fde7b2bfb892b9f2ce62da485473 [3880/3985] mm/vmalloc.c: preload a CPU with one object for split purpose
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-rc1-7-g2b96cd8-dirty
git checkout 1203396fa708fde7b2bfb892b9f2ce62da485473
make ARCH=x86_64 allmodconfig
make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
>> mm/vmalloc.c:1076:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct vmap_area *[noderef] <asn:3> *__p @@ got [noderef] <asn:3> *__p @@
>> mm/vmalloc.c:1076:21: sparse: expected struct vmap_area *[noderef] <asn:3> *__p
>> mm/vmalloc.c:1076:21: sparse: got struct vmap_area **
mm/vmalloc.c:961:23: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct vmap_area *[noderef] <asn:3> *__p @@ got [noderef] <asn:3> *__p @@
mm/vmalloc.c:961:23: sparse: expected struct vmap_area *[noderef] <asn:3> *__p
mm/vmalloc.c:961:23: sparse: got struct vmap_area **
>> mm/vmalloc.c:1076:21: sparse: sparse: dereference of noderef expression
>> mm/vmalloc.c:1076:21: sparse: sparse: dereference of noderef expression
mm/vmalloc.c:961:23: sparse: sparse: dereference of noderef expression
mm/vmalloc.c:961:23: sparse: sparse: dereference of noderef expression
vim +1076 mm/vmalloc.c
1047
1048 /*
1049 * Preload this CPU with one extra vmap_area object to ensure
1050 * that we have it available when fit type of free area is
1051 * NE_FIT_TYPE.
1052 *
1053 * The preload is done in non-atomic context, thus it allows us
1054 * to use more permissive allocation masks to be more stable under
1055 * low memory condition and high memory pressure.
1056 *
1057 * If success it returns 1 with preemption disabled. In case
1058 * of error 0 is returned with preemption not disabled. Note it
1059 * has to be paired with ne_fit_preload_end().
1060 */
1061 static int
1062 ne_fit_preload(int nid)
1063 {
1064 preempt_disable();
1065
1066 if (!__this_cpu_read(ne_fit_preload_node)) {
1067 struct vmap_area *node;
1068
1069 preempt_enable();
1070 node = kmem_cache_alloc_node(vmap_area_cachep, GFP_KERNEL, nid);
1071 if (node == NULL)
1072 return 0;
1073
1074 preempt_disable();
1075
> 1076 if (__this_cpu_cmpxchg(ne_fit_preload_node, NULL, node))
1077 kmem_cache_free(vmap_area_cachep, node);
1078 }
1079
1080 return 1;
1081 }
1082
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
reply other threads:[~2019-05-31 21:13 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=201906010541.Xrg8P8Mi%lkp@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=kbuild-all@01.org \
--cc=linux-mm@kvack.org \
--cc=urezki@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).