* [android-common:android12-5.10 7325/13830] kernel/tracepoint.c:683:27: sparse: sparse: incorrect type in assignment (different address spaces)
@ 2021-12-12 4:13 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-12-12 4:13 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 3478 bytes --]
tree: https://android.googlesource.com/kernel/common android12-5.10
head: 2d6a43c0364d3bb0c5c00b0a32b27f4c7740e004
commit: cc6eed90a467a413b9c62fdd76e8f06347266a88 [7325/13830] ANDROID: vendor_hooks: Allow multiple attachments to restricted hooks
config: x86_64-randconfig-s021-20211207 (https://download.01.org/0day-ci/archive/20211212/202112121232.EcEv8ckj-lkp(a)intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-dirty
git remote add android-common https://android.googlesource.com/kernel/common
git fetch --no-tags android-common android12-5.10
git checkout cc6eed90a467a413b9c62fdd76e8f06347266a88
# save the config file to linux build tree
mkdir build_dir
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=x86_64 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <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, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-12-12 4:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-12 4:13 [android-common:android12-5.10 7325/13830] 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.