* [android-common:mirror-chromeos-5.10-arcvm 7325/27674] kernel/tracepoint.c:683:27: sparse: sparse: incorrect type in assignment (different address spaces)
@ 2023-06-19 9:35 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-06-19 9:35 UTC (permalink / raw)
To: cros-kernel-buildreports; +Cc: oe-kbuild-all
tree: https://android.googlesource.com/kernel/common mirror-chromeos-5.10-arcvm
head: 31e1367ff78eb68e54a2025e9c6601e3fa6c6312
commit: cc6eed90a467a413b9c62fdd76e8f06347266a88 [7325/27674] ANDROID: vendor_hooks: Allow multiple attachments to restricted hooks
config: x86_64-randconfig-s021-20230614 (https://download.01.org/0day-ci/archive/20230619/202306191708.lhPUtNKL-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce: (https://download.01.org/0day-ci/archive/20230619/202306191708.lhPUtNKL-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/202306191708.lhPUtNKL-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> kernel/tracepoint.c:683:27: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func [noderef] __rcu *funcs @@ got void * @@
kernel/tracepoint.c:683:27: sparse: expected struct tracepoint_func [noderef] __rcu *funcs
kernel/tracepoint.c:683:27: sparse: got void *
>> kernel/tracepoint.c:692:25: sparse: sparse: cast removes address space '__rcu' of expression
>> kernel/tracepoint.c:714:38: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected struct tracepoint_func *tp_funcs @@ got struct tracepoint_func [noderef] __rcu *funcs @@
kernel/tracepoint.c:714:38: sparse: expected struct tracepoint_func *tp_funcs
kernel/tracepoint.c:714:38: sparse: got struct tracepoint_func [noderef] __rcu *funcs
>> kernel/tracepoint.c:689:31: sparse: sparse: dereference of noderef expression
kernel/tracepoint.c:691:42: sparse: sparse: dereference of noderef expression
vim +683 kernel/tracepoint.c
675
676 #define ANDROID_RVH_NR_PROBES_MAX 2
677 static int rvh_func_add(struct tracepoint *tp, struct tracepoint_func *func)
678 {
679 int i;
680
681 if (!static_key_enabled(&tp->key)) {
682 /* '+ 1' for the last NULL element */
> 683 tp->funcs = rvh_zalloc_funcs(ANDROID_RVH_NR_PROBES_MAX + 1);
684 if (!tp->funcs)
685 return ENOMEM;
686 }
687
688 for (i = 0; i < ANDROID_RVH_NR_PROBES_MAX; i++) {
> 689 if (!tp->funcs[i].func) {
690 if (!static_key_enabled(&tp->key))
691 tp->funcs[i].data = func->data;
> 692 WRITE_ONCE(tp->funcs[i].func, func->func);
693
694 return 0;
695 }
696 }
697
698 return -EBUSY;
699 }
700
701 static int android_rvh_add_func(struct tracepoint *tp, struct tracepoint_func *func)
702 {
703 int ret;
704
705 if (tp->regfunc && !static_key_enabled(&tp->key)) {
706 ret = tp->regfunc();
707 if (ret < 0)
708 return ret;
709 }
710
711 ret = rvh_func_add(tp, func);
712 if (ret)
713 return ret;
> 714 tracepoint_update_call(tp, tp->funcs, false);
715 static_key_enable(&tp->key);
716
717 return 0;
718 }
719
--
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:[~2023-06-19 9:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-19 9:35 [android-common:mirror-chromeos-5.10-arcvm 7325/27674] kernel/tracepoint.c:683:27: sparse: sparse: incorrect type in assignment (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.