linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Rakie Kim <rakie.kim@sk.com>
Cc: oe-kbuild-all@lists.linux.dev,
	David Hildenbrand <david@redhat.com>,
	Honggyu Kim <honggyu.kim@sk.com>,
	Gregory Price <gregory.price@memverge.com>,
	Hyeongtak Ji <hyeongtak.ji@sk.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linux Memory Management List <linux-mm@kvack.org>
Subject: [davidhildenbrand:rmap_batching 86/136] mm/mempolicy.c:3135:17: sparse: sparse: incorrect type in argument 1 (different address spaces)
Date: Sun, 28 Jan 2024 10:01:53 +0800	[thread overview]
Message-ID: <202401280905.OUS18DsI-lkp@intel.com> (raw)

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


                 reply	other threads:[~2024-01-28  2:02 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=202401280905.OUS18DsI-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=david@redhat.com \
    --cc=gregory.price@memverge.com \
    --cc=honggyu.kim@sk.com \
    --cc=hyeongtak.ji@sk.com \
    --cc=linux-mm@kvack.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=rakie.kim@sk.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).