tree:
https://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git
rcu/nocb-toggle-v4
head: 579e15efa48fb6fc4ecf14961804051f385807fe
commit: 579e15efa48fb6fc4ecf14961804051f385807fe [19/19] rcu/nocb: Detect unsafe checks
for offloaded rdp
config: c6x-randconfig-r022-20201113 (attached as .config)
compiler: c6x-elf-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
#
https://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.g...
git remote add dynticks
https://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git
git fetch --no-tags dynticks rcu/nocb-toggle-v4
git checkout 579e15efa48fb6fc4ecf14961804051f385807fe
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=c6x
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from include/linux/rcupdate_wait.h:9,
from kernel/rcu/tree.c:25:
kernel/rcu/tree_plugin.h: In function 'rcu_rdp_is_offloaded':
> kernel/rcu/tree_plugin.h:71:40: error: implicit declaration of
function 'lockdep_is_cpus_held'; did you mean 'lockdep_assert_cpus_held'?
[-Werror=implicit-function-declaration]
71 |
(IS_ENABLED(CONFIG_HOTPLUG_CPU) && lockdep_is_cpus_held()) ||
| ^~~~~~~~~~~~~~~~~~~~
include/linux/rcupdate.h:335:52: note: in definition of macro
'RCU_LOCKDEP_WARN'
335 | #define RCU_LOCKDEP_WARN(c, s) do { } while (0 && (c))
| ^
cc1: some warnings being treated as errors
vim +71 kernel/rcu/tree_plugin.h
57
58 static bool rcu_rdp_is_offloaded(struct rcu_data *rdp)
59 {
60 /*
61 * In order to read the offloaded state of an rdp is a safe
62 * and stable way and prevent from its value to be changed
63 * under us, we must either hold the barrier mutex, the cpu
64 * hotplug lock (read or write) or the nocb lock. Local
65 * non-preemptible reads are also safe. NOCB kthreads and
66 * timers have their own means of synchronization against the
67 * offloaded state updaters.
68 */
69 RCU_LOCKDEP_WARN(
70 !(lockdep_is_held(&rcu_state.barrier_mutex) ||
71 (IS_ENABLED(CONFIG_HOTPLUG_CPU) &&
lockdep_is_cpus_held()) ||
72 rcu_lockdep_is_held_nocb(rdp) ||
73 (rdp == this_cpu_ptr(&rcu_data) &&
74 !(IS_ENABLED(CONFIG_PREEMPT_COUNT) && preemptible())) ||
75 rcu_current_is_nocb_kthread(rdp) ||
76 rcu_running_nocb_timer(rdp)),
77 "Unsafe read of RCU_NOCB offloaded state"
78 );
79
80 return rcu_segcblist_is_offloaded(&rdp->cblist);
81 }
82
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org