[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-mm
Subject:    [linux-next:master 3880/3985] mm/vmalloc.c:1076:21: sparse: sparse: incorrect type in initializer (d
From:       kbuild test robot <lkp () intel ! com>
Date:       2019-05-31 21:13:45
Message-ID: 201906010541.Xrg8P8Mi%lkp () intel ! com
[Download RAW message or body]

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic