* [rcu:dev.2021.01.26a 61/65] kernel/rcu/tree_plugin.h:2430:9: sparse: sparse: context imbalance in 'rcu_nocb_rdp_deoffload' - wrong count at exit
@ 2021-02-02 12:40 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-02-02 12:40 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 8612 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Frederic Weisbecker <frederic@kernel.org>
CC: "Paul E. McKenney" <paulmck@kernel.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git dev.2021.01.26a
head: 142d159f544763140e0f498936bca8f71563e0e0
commit: 4fbfeec81533e6ea9811e57cc848ee30522c0517 [61/65] rcu/nocb: Forbid NOCB toggling on offline CPUs
:::::: branch date: 5 days ago
:::::: commit date: 5 days ago
config: sparc64-randconfig-s031-20210202 (attached as .config)
compiler: sparc64-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-215-g0fb77bb6-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git/commit/?id=4fbfeec81533e6ea9811e57cc848ee30522c0517
git remote add rcu https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git
git fetch --no-tags rcu dev.2021.01.26a
git checkout 4fbfeec81533e6ea9811e57cc848ee30522c0517
# 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__' ARCH=sparc64
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/rcu/tree.c: note: in included file:
kernel/rcu/tree_plugin.h:1557:5: sparse: sparse: symbol 'nocb_nobypass_lim_per_jiffy' was not declared. Should it be static?
kernel/rcu/tree.c:1455:9: sparse: sparse: context imbalance in 'rcu_start_this_gp' - different lock contexts for basic block
kernel/rcu/tree.c:1867:9: sparse: sparse: context imbalance in 'rcu_gp_init' - different lock contexts for basic block
kernel/rcu/tree.c:2646:9: sparse: sparse: context imbalance in 'force_qs_rnp' - different lock contexts for basic block
kernel/rcu/tree.c:2699:25: sparse: sparse: context imbalance in 'rcu_force_quiescent_state' - unexpected unlock
kernel/rcu/tree.c:2729:30: sparse: sparse: context imbalance in 'rcu_core' - different lock contexts for basic block
kernel/rcu/tree.c: note: in included file:
kernel/rcu/tree_stall.h:316:12: sparse: sparse: context imbalance in 'rcu_print_task_stall' - unexpected unlock
kernel/rcu/tree_stall.h:540:9: sparse: sparse: context imbalance in 'print_other_cpu_stall' - different lock contexts for basic block
kernel/rcu/tree.c: note: in included file:
kernel/rcu/tree_exp.h:189:9: sparse: sparse: context imbalance in '__rcu_report_exp_rnp' - different lock contexts for basic block
kernel/rcu/tree.c: note: in included file:
kernel/rcu/tree_plugin.h:1603:16: sparse: sparse: context imbalance in 'rcu_nocb_bypass_trylock' - wrong count at exit
kernel/rcu/tree_plugin.h:1620:13: sparse: sparse: context imbalance in 'rcu_nocb_lock' - wrong count at exit
kernel/rcu/tree_plugin.h:1636:17: sparse: sparse: context imbalance in 'rcu_nocb_unlock' - unexpected unlock
kernel/rcu/tree_plugin.h:1649:17: sparse: sparse: context imbalance in 'rcu_nocb_unlock_irqrestore' - unexpected unlock
kernel/rcu/tree_plugin.h:1695:13: sparse: sparse: context imbalance in 'wake_nocb_gp' - wrong count at exit
kernel/rcu/tree_plugin.h:1763:9: sparse: sparse: context imbalance in 'rcu_nocb_do_flush_bypass' - unexpected unlock
kernel/rcu/tree_plugin.h:1778:13: sparse: sparse: context imbalance in 'rcu_nocb_flush_bypass' - wrong count at exit
kernel/rcu/tree_plugin.h:1929:13: sparse: sparse: context imbalance in '__call_rcu_nocb_wake' - wrong count at exit
kernel/rcu/tree_plugin.h:1993:9: sparse: sparse: context imbalance in 'do_nocb_bypass_wakeup_timer' - different lock contexts for basic block
kernel/rcu/tree_plugin.h:2069:9: sparse: sparse: context imbalance in 'nocb_gp_wait' - different lock contexts for basic block
kernel/rcu/tree_plugin.h:2287:9: sparse: sparse: context imbalance in 'nocb_cb_wait' - wrong count at exit
kernel/rcu/tree_plugin.h:2324:13: sparse: sparse: context imbalance in 'do_nocb_deferred_wakeup_common' - different lock contexts for basic block
kernel/rcu/tree_plugin.h:2398:9: sparse: sparse: context imbalance in 'rdp_offload_toggle' - wrong count at exit
>> kernel/rcu/tree_plugin.h:2430:9: sparse: sparse: context imbalance in 'rcu_nocb_rdp_deoffload' - wrong count at exit
vim +/rcu_nocb_rdp_deoffload +2430 kernel/rcu/tree_plugin.h
254e11efde66ca Frederic Weisbecker 2020-11-13 2400
4fbfeec81533e6 Frederic Weisbecker 2021-01-28 2401 static long rcu_nocb_rdp_deoffload(void *arg)
254e11efde66ca Frederic Weisbecker 2020-11-13 2402 {
4fbfeec81533e6 Frederic Weisbecker 2021-01-28 2403 struct rcu_data *rdp = arg;
254e11efde66ca Frederic Weisbecker 2020-11-13 2404 struct rcu_segcblist *cblist = &rdp->cblist;
254e11efde66ca Frederic Weisbecker 2020-11-13 2405 unsigned long flags;
254e11efde66ca Frederic Weisbecker 2020-11-13 2406 int ret;
254e11efde66ca Frederic Weisbecker 2020-11-13 2407
4fbfeec81533e6 Frederic Weisbecker 2021-01-28 2408 WARN_ON_ONCE(rdp->cpu != raw_smp_processor_id());
4fbfeec81533e6 Frederic Weisbecker 2021-01-28 2409
f759081e8f5ac6 Paul E. McKenney 2020-12-21 2410 pr_info("De-offloading %d\n", rdp->cpu);
254e11efde66ca Frederic Weisbecker 2020-11-13 2411
254e11efde66ca Frederic Weisbecker 2020-11-13 2412 rcu_nocb_lock_irqsave(rdp, flags);
254e11efde66ca Frederic Weisbecker 2020-11-13 2413
254e11efde66ca Frederic Weisbecker 2020-11-13 2414 ret = rdp_offload_toggle(rdp, false, flags);
5bb39dc956f3d4 Frederic Weisbecker 2020-11-13 2415 swait_event_exclusive(rdp->nocb_state_wq,
5bb39dc956f3d4 Frederic Weisbecker 2020-11-13 2416 !rcu_segcblist_test_flags(cblist, SEGCBLIST_KTHREAD_CB |
5bb39dc956f3d4 Frederic Weisbecker 2020-11-13 2417 SEGCBLIST_KTHREAD_GP));
69cdea873cde26 Frederic Weisbecker 2020-11-13 2418 rcu_nocb_lock_irqsave(rdp, flags);
314202f84ddd61 Frederic Weisbecker 2020-11-13 2419 /* Make sure nocb timer won't stay around */
69cdea873cde26 Frederic Weisbecker 2020-11-13 2420 WRITE_ONCE(rdp->nocb_defer_wakeup, RCU_NOCB_WAKE_OFF);
69cdea873cde26 Frederic Weisbecker 2020-11-13 2421 rcu_nocb_unlock_irqrestore(rdp, flags);
69cdea873cde26 Frederic Weisbecker 2020-11-13 2422 del_timer_sync(&rdp->nocb_timer);
69cdea873cde26 Frederic Weisbecker 2020-11-13 2423
314202f84ddd61 Frederic Weisbecker 2020-11-13 2424 /*
314202f84ddd61 Frederic Weisbecker 2020-11-13 2425 * Flush bypass. While IRQs are disabled and once we set
314202f84ddd61 Frederic Weisbecker 2020-11-13 2426 * SEGCBLIST_SOFTIRQ_ONLY, no callback is supposed to be
314202f84ddd61 Frederic Weisbecker 2020-11-13 2427 * enqueued on bypass.
314202f84ddd61 Frederic Weisbecker 2020-11-13 2428 */
314202f84ddd61 Frederic Weisbecker 2020-11-13 2429 rcu_nocb_lock_irqsave(rdp, flags);
314202f84ddd61 Frederic Weisbecker 2020-11-13 @2430 rcu_nocb_flush_bypass(rdp, NULL, jiffies);
b9ced9e1ab51ed Frederic Weisbecker 2020-11-13 2431 rcu_segcblist_set_flags(cblist, SEGCBLIST_SOFTIRQ_ONLY);
b9ced9e1ab51ed Frederic Weisbecker 2020-11-13 2432 /*
b9ced9e1ab51ed Frederic Weisbecker 2020-11-13 2433 * With SEGCBLIST_SOFTIRQ_ONLY, we can't use
b9ced9e1ab51ed Frederic Weisbecker 2020-11-13 2434 * rcu_nocb_unlock_irqrestore() anymore. Theoretically we
b9ced9e1ab51ed Frederic Weisbecker 2020-11-13 2435 * could set SEGCBLIST_SOFTIRQ_ONLY with cb unlocked and IRQs
b9ced9e1ab51ed Frederic Weisbecker 2020-11-13 2436 * disabled now, but let's be paranoid.
b9ced9e1ab51ed Frederic Weisbecker 2020-11-13 2437 */
b9ced9e1ab51ed Frederic Weisbecker 2020-11-13 2438 raw_spin_unlock_irqrestore(&rdp->nocb_lock, flags);
314202f84ddd61 Frederic Weisbecker 2020-11-13 2439
254e11efde66ca Frederic Weisbecker 2020-11-13 2440 return ret;
d97b078182406c Frederic Weisbecker 2020-11-13 2441 }
d97b078182406c Frederic Weisbecker 2020-11-13 2442
:::::: The code at line 2430 was first introduced by commit
:::::: 314202f84ddd61e4d7576ef62570ad2e2d9db06b rcu/nocb: Flush bypass before setting SEGCBLIST_SOFTIRQ_ONLY
:::::: TO: Frederic Weisbecker <frederic@kernel.org>
:::::: CC: Paul E. McKenney <paulmck@kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 21671 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-02-02 12:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-02 12:40 [rcu:dev.2021.01.26a 61/65] kernel/rcu/tree_plugin.h:2430:9: sparse: sparse: context imbalance in 'rcu_nocb_rdp_deoffload' - wrong count at exit 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.