[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202107150317.v189gyQi-lkp@intel.com>
Date: Thu, 15 Jul 2021 03:18:15 +0800
From: kernel test robot <lkp@...el.com>
To: kan.liang@...ux.intel.com, peterz@...radead.org, mingo@...hat.com,
acme@...nel.org, tglx@...utronix.de, bp@...en8.de,
linux-kernel@...r.kernel.org
Cc: kbuild-all@...ts.01.org, eranian@...gle.com, namhyung@...nel.org,
ak@...ux.intel.com, Kan Liang <kan.liang@...ux.intel.com>
Subject: Re: [PATCH V5 2/6] perf: attach/detach PMU specific data
Hi,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on tip/perf/core]
[also build test WARNING on tip/sched/core powerpc/next v5.14-rc1 next-20210714]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/kan-liang-linux-intel-com/perf-Save-PMU-specific-data-in-task_struct/20210714-034829
base: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git c76826a65f50038f050424365dbf3f97203f8710
config: riscv-randconfig-s031-20210714 (attached as .config)
compiler: riscv32-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-341-g8af24329-dirty
# https://github.com/0day-ci/linux/commit/5600461badd8a97324b24dde400e078bc7ee1cdd
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review kan-liang-linux-intel-com/perf-Save-PMU-specific-data-in-task_struct/20210714-034829
git checkout 5600461badd8a97324b24dde400e078bc7ee1cdd
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=riscv SHELL=/bin/bash kernel/events/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
sparse warnings: (new ones prefixed by >>)
kernel/events/core.c:1464:15: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:1464:15: sparse: struct perf_event_context [noderef] __rcu *
kernel/events/core.c:1464:15: sparse: struct perf_event_context *
kernel/events/core.c:1477:28: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:1477:28: sparse: struct perf_event_context [noderef] __rcu *
kernel/events/core.c:1477:28: sparse: struct perf_event_context *
kernel/events/core.c:3427:18: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:3427:18: sparse: struct perf_event_context [noderef] __rcu *
kernel/events/core.c:3427:18: sparse: struct perf_event_context *
kernel/events/core.c:3428:23: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:3428:23: sparse: struct perf_event_context [noderef] __rcu *
kernel/events/core.c:3428:23: sparse: struct perf_event_context *
kernel/events/core.c:3476:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:3476:25: sparse: struct perf_event_context [noderef] __rcu *
kernel/events/core.c:3476:25: sparse: struct perf_event_context *
kernel/events/core.c:3477:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:3477:25: sparse: struct perf_event_context [noderef] __rcu *
kernel/events/core.c:3477:25: sparse: struct perf_event_context *
kernel/events/core.c:4677:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:4677:25: sparse: struct perf_event_context [noderef] __rcu *
kernel/events/core.c:4677:25: sparse: struct perf_event_context *
kernel/events/core.c:6159:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:6159:9: sparse: struct perf_buffer [noderef] __rcu *
kernel/events/core.c:6159:9: sparse: struct perf_buffer *
>> kernel/events/core.c:4833:21: sparse: sparse: cast removes address space '__rcu' of expression
kernel/events/core.c:4943:13: sparse: sparse: cast removes address space '__rcu' of expression
kernel/events/core.c:5635:24: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __poll_t [usertype] events @@ got int @@
kernel/events/core.c:5865:22: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:5865:22: sparse: struct perf_buffer [noderef] __rcu *
kernel/events/core.c:5865:22: sparse: struct perf_buffer *
kernel/events/core.c:6001:14: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:6001:14: sparse: struct perf_buffer [noderef] __rcu *
kernel/events/core.c:6001:14: sparse: struct perf_buffer *
kernel/events/core.c:6034:14: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:6034:14: sparse: struct perf_buffer [noderef] __rcu *
kernel/events/core.c:6034:14: sparse: struct perf_buffer *
kernel/events/core.c:6091:14: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:6091:14: sparse: struct perf_buffer [noderef] __rcu *
kernel/events/core.c:6091:14: sparse: struct perf_buffer *
kernel/events/core.c:6177:14: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:6177:14: sparse: struct perf_buffer [noderef] __rcu *
kernel/events/core.c:6177:14: sparse: struct perf_buffer *
kernel/events/core.c:6190:14: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:6190:14: sparse: struct perf_buffer [noderef] __rcu *
kernel/events/core.c:6190:14: sparse: struct perf_buffer *
kernel/events/core.c:7825:23: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:7825:23: sparse: struct perf_event_context [noderef] __rcu *
kernel/events/core.c:7825:23: sparse: struct perf_event_context *
kernel/events/core.c:7877:23: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:7877:23: sparse: struct perf_event_context [noderef] __rcu *
kernel/events/core.c:7877:23: sparse: struct perf_event_context *
kernel/events/core.c:7916:13: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:7916:13: sparse: struct perf_buffer [noderef] __rcu *
kernel/events/core.c:7916:13: sparse: struct perf_buffer *
kernel/events/core.c:8021:61: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected struct task_struct *p @@ got struct task_struct [noderef] __rcu *real_parent @@
kernel/events/core.c:8021:61: sparse: expected struct task_struct *p
kernel/events/core.c:8021:61: sparse: got struct task_struct [noderef] __rcu *real_parent
kernel/events/core.c:8023:61: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected struct task_struct *p @@ got struct task_struct [noderef] __rcu *real_parent @@
kernel/events/core.c:8023:61: sparse: expected struct task_struct *p
kernel/events/core.c:8023:61: sparse: got struct task_struct [noderef] __rcu *real_parent
kernel/events/core.c:8780:23: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:8780:23: sparse: struct perf_event_context [noderef] __rcu *
kernel/events/core.c:8780:23: sparse: struct perf_event_context *
kernel/events/core.c:9745:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:9745:9: sparse: struct swevent_hlist [noderef] __rcu *
kernel/events/core.c:9745:9: sparse: struct swevent_hlist *
kernel/events/core.c:9784:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:9784:17: sparse: struct swevent_hlist [noderef] __rcu *
kernel/events/core.c:9784:17: sparse: struct swevent_hlist *
kernel/events/core.c:9965:23: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:9965:23: sparse: struct perf_event_context [noderef] __rcu *
kernel/events/core.c:9965:23: sparse: struct perf_event_context *
kernel/events/core.c:11150:1: sparse: sparse: symbol 'dev_attr_nr_addr_filters' was not declared. Should it be static?
kernel/events/core.c:12928:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:12928:9: sparse: struct perf_event_context [noderef] __rcu *
kernel/events/core.c:12928:9: sparse: struct perf_event_context *
kernel/events/core.c:13045:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:13045:17: sparse: struct perf_event_context [noderef] __rcu *
kernel/events/core.c:13045:17: sparse: struct perf_event_context *
kernel/events/core.c:13476:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:13476:17: sparse: struct swevent_hlist [noderef] __rcu *
kernel/events/core.c:13476:17: sparse: struct swevent_hlist *
kernel/events/core.c:168:9: sparse: sparse: context imbalance in 'perf_ctx_lock' - wrong count at exit
kernel/events/core.c:176:17: sparse: sparse: context imbalance in 'perf_ctx_unlock' - unexpected unlock
kernel/events/core.c: note: in included file (through include/linux/rculist.h, include/linux/dcache.h, include/linux/fs.h):
include/linux/rcupdate.h:707:9: sparse: sparse: context imbalance in 'perf_lock_task_context' - different lock contexts for basic block
kernel/events/core.c:1511:17: sparse: sparse: context imbalance in 'perf_pin_task_context' - unexpected unlock
kernel/events/core.c:2824:9: sparse: sparse: context imbalance in '__perf_install_in_context' - wrong count at exit
kernel/events/core.c:4649:17: sparse: sparse: context imbalance in 'find_get_context' - unexpected unlock
kernel/events/core.c: note: in included file:
kernel/events/internal.h:197:46: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *from @@ got void const *src @@
kernel/events/core.c:9594:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:9594:17: sparse: struct swevent_hlist [noderef] __rcu *
kernel/events/core.c:9594:17: sparse: struct swevent_hlist *
kernel/events/core.c:9614:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:9614:17: sparse: struct swevent_hlist [noderef] __rcu *
kernel/events/core.c:9614:17: sparse: struct swevent_hlist *
kernel/events/core.c:9734:16: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:9734:16: sparse: struct swevent_hlist [noderef] __rcu *
kernel/events/core.c:9734:16: sparse: struct swevent_hlist *
kernel/events/core.c:9734:16: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:9734:16: sparse: struct swevent_hlist [noderef] __rcu *
kernel/events/core.c:9734:16: sparse: struct swevent_hlist *
kernel/events/core.c:9734:16: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:9734:16: sparse: struct swevent_hlist [noderef] __rcu *
kernel/events/core.c:9734:16: sparse: struct swevent_hlist *
vim +/__rcu +4833 kernel/events/core.c
4821
4822 static int
4823 attach_task_ctx_data(struct task_struct *task, struct kmem_cache *ctx_cache,
4824 bool global)
4825 {
4826 struct perf_ctx_data *cd, *old = NULL;
4827
4828 cd = alloc_perf_ctx_data(ctx_cache, global);
4829 if (!cd)
4830 return -ENOMEM;
4831
4832 for (;;) {
> 4833 if (try_cmpxchg(&task->perf_ctx_data,
4834 (struct perf_ctx_data __rcu **)&old,
4835 (struct perf_ctx_data __rcu *)cd)) {
4836 if (old)
4837 perf_free_ctx_data_rcu(old);
4838 return 0;
4839 }
4840
4841 if (!old) {
4842 /*
4843 * After seeing a dead @old, we raced with
4844 * removal and lost, try again to install @cd.
4845 */
4846 continue;
4847 }
4848
4849 if (refcount_inc_not_zero(&old->refcount)) {
4850 free_perf_ctx_data(cd); /* unused */
4851 return 0;
4852 }
4853
4854 /*
4855 * @old is a dead object, refcount==0 is stable, try and
4856 * replace it with @cd.
4857 */
4858 }
4859 return 0;
4860 }
4861
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (34475 bytes)
Powered by blists - more mailing lists