All of lore.kernel.org
 help / color / mirror / Atom feed
* [davidhildenbrand:rmap_batching 86/136] mm/mempolicy.c:3135:17: sparse: sparse: incorrect type in argument 1 (different address spaces)
@ 2024-01-28  2:01 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-01-28  2:01 UTC (permalink / raw)
  To: Rakie Kim
  Cc: oe-kbuild-all, David Hildenbrand, Honggyu Kim, Gregory Price,
	Hyeongtak Ji, Andrew Morton, Linux Memory Management List

tree:   https://github.com/davidhildenbrand/linux rmap_batching
head:   865e6d6a176a1f50bcbb7dd1d6a57b803e398039
commit: e65050eda564d19ea9e6dc8dd3d5e5ccc69bc6ec [86/136] mm/mempolicy: implement the sysfs-based weighted_interleave interface
config: x86_64-randconfig-r131-20240127 (https://download.01.org/0day-ci/archive/20240128/202401280905.OUS18DsI-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240128/202401280905.OUS18DsI-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202401280905.OUS18DsI-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
   mm/mempolicy.c:3097:15: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected unsigned char [noderef] [usertype] __rcu *table @@     got unsigned char * @@
   mm/mempolicy.c:3097:15: sparse:     expected unsigned char [noderef] [usertype] __rcu *table
   mm/mempolicy.c:3097:15: sparse:     got unsigned char *
   mm/mempolicy.c:3127:13: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected unsigned char [noderef] [usertype] __rcu *new @@     got void * @@
   mm/mempolicy.c:3127:13: sparse:     expected unsigned char [noderef] [usertype] __rcu *new
   mm/mempolicy.c:3127:13: sparse:     got void *
   mm/mempolicy.c:3132:13: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected unsigned char [noderef] [usertype] __rcu *old @@     got unsigned char * @@
   mm/mempolicy.c:3132:13: sparse:     expected unsigned char [noderef] [usertype] __rcu *old
   mm/mempolicy.c:3132:13: sparse:     got unsigned char *
>> mm/mempolicy.c:3135:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const * @@     got unsigned char [noderef] [usertype] __rcu *new @@
   mm/mempolicy.c:3135:17: sparse:     expected void const *
   mm/mempolicy.c:3135:17: sparse:     got unsigned char [noderef] [usertype] __rcu *new
   mm/mempolicy.c:3135:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const * @@     got unsigned char [noderef] [usertype] __rcu *old @@
   mm/mempolicy.c:3135:17: sparse:     expected void const *
   mm/mempolicy.c:3135:17: sparse:     got unsigned char [noderef] [usertype] __rcu *old
>> mm/mempolicy.c:3135:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const * @@     got unsigned char [noderef] [usertype] __rcu *new @@
   mm/mempolicy.c:3135:17: sparse:     expected void const *
   mm/mempolicy.c:3135:17: sparse:     got unsigned char [noderef] [usertype] __rcu *new
   mm/mempolicy.c:3135:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const * @@     got unsigned char [noderef] [usertype] __rcu *old @@
   mm/mempolicy.c:3135:17: sparse:     expected void const *
   mm/mempolicy.c:3135:17: sparse:     got unsigned char [noderef] [usertype] __rcu *old
>> mm/mempolicy.c:3135:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *p @@     got unsigned char [noderef] [usertype] __rcu *new @@
   mm/mempolicy.c:3135:17: sparse:     expected void *p
   mm/mempolicy.c:3135:17: sparse:     got unsigned char [noderef] [usertype] __rcu *new
>> mm/mempolicy.c:3135:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void const *q @@     got unsigned char [noderef] [usertype] __rcu *old @@
   mm/mempolicy.c:3135:17: sparse:     expected void const *q
   mm/mempolicy.c:3135:17: sparse:     got unsigned char [noderef] [usertype] __rcu *old
   mm/mempolicy.c:3137:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const * @@     got unsigned char [noderef] [usertype] __rcu *new @@
   mm/mempolicy.c:3137:17: sparse:     expected void const *
   mm/mempolicy.c:3137:17: sparse:     got unsigned char [noderef] [usertype] __rcu *new
   mm/mempolicy.c:3137:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const * @@     got unsigned char [noderef] [usertype] __rcu *new @@
   mm/mempolicy.c:3137:17: sparse:     expected void const *
   mm/mempolicy.c:3137:17: sparse:     got unsigned char [noderef] [usertype] __rcu *new
   mm/mempolicy.c:3137:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *p @@     got unsigned char [noderef] [usertype] __rcu *new @@
   mm/mempolicy.c:3137:17: sparse:     expected void *p
   mm/mempolicy.c:3137:17: sparse:     got unsigned char [noderef] [usertype] __rcu *new
   mm/mempolicy.c:3142:15: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const *objp @@     got unsigned char [noderef] [usertype] __rcu *old @@
   mm/mempolicy.c:3142:15: sparse:     expected void const *objp
   mm/mempolicy.c:3142:15: sparse:     got unsigned char [noderef] [usertype] __rcu *old
   mm/mempolicy.c:3239:13: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected unsigned char [noderef] [usertype] __rcu *old @@     got unsigned char * @@
   mm/mempolicy.c:3239:13: sparse:     expected unsigned char [noderef] [usertype] __rcu *old
   mm/mempolicy.c:3239:13: sparse:     got unsigned char *
   mm/mempolicy.c:3245:15: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const *objp @@     got unsigned char [noderef] [usertype] __rcu *old @@
   mm/mempolicy.c:3245:15: sparse:     expected void const *objp
   mm/mempolicy.c:3245:15: sparse:     got unsigned char [noderef] [usertype] __rcu *old
   mm/mempolicy.c: note: in included file (through include/linux/mmzone.h, include/linux/mempolicy.h):
   include/linux/page-flags.h:242:46: sparse: sparse: self-comparison always evaluates to false
   mm/mempolicy.c: note: in included file (through include/linux/rbtree.h, include/linux/mm_types.h, include/linux/mmzone.h, ...):
   include/linux/rcupdate.h:781:9: sparse: sparse: context imbalance in 'queue_folios_pte_range' - unexpected unlock
   mm/mempolicy.c: note: in included file (through arch/x86/include/asm/uaccess.h, include/linux/uaccess.h, include/linux/sched/task.h, ...):
   arch/x86/include/asm/uaccess_64.h:88:24: sparse: sparse: cast removes address space '__user' of expression
   mm/mempolicy.c:3098:31: sparse: sparse: dereference of noderef expression
   mm/mempolicy.c:3138:12: sparse: sparse: dereference of noderef expression

vim +3135 mm/mempolicy.c

  3103	
  3104	static ssize_t node_store(struct kobject *kobj, struct kobj_attribute *attr,
  3105				  const char *buf, size_t count)
  3106	{
  3107		struct iw_node_attr *node_attr;
  3108		u8 __rcu *new;
  3109		u8 __rcu *old;
  3110		u8 weight = 0;
  3111	
  3112		node_attr = container_of(attr, struct iw_node_attr, kobj_attr);
  3113		if (count == 0 || sysfs_streq(buf, ""))
  3114			weight = 0;
  3115		else if (kstrtou8(buf, 0, &weight))
  3116			return -EINVAL;
  3117	
  3118		/*
  3119		 * The default weight is 1 (for now), when the kernel-internal
  3120		 * default weight array is implemented, this should be updated to
  3121		 * collect the system-default weight of the node if the user passes 0.
  3122		 */
  3123		if (!weight)
  3124			weight = 1;
  3125	
  3126		/* We only need to allocate up to the number of possible nodes */
  3127		new = kmalloc(nr_node_ids, GFP_KERNEL);
  3128		if (!new)
  3129			return -ENOMEM;
  3130	
  3131		mutex_lock(&iw_table_lock);
  3132		old = rcu_dereference_protected(iw_table,
  3133						lockdep_is_held(&iw_table_lock));
  3134		if (old)
> 3135			memcpy(new, old, nr_node_ids);
  3136		else
  3137			memset(new, 1, nr_node_ids);
  3138		new[node_attr->nid] = weight;
  3139		rcu_assign_pointer(iw_table, new);
  3140		mutex_unlock(&iw_table_lock);
  3141		synchronize_rcu();
  3142		kfree(old);
  3143		return count;
  3144	}
  3145	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-01-28  2:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-28  2:01 [davidhildenbrand:rmap_batching 86/136] mm/mempolicy.c:3135:17: sparse: sparse: incorrect type in argument 1 (different address spaces) kernel test robot

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.