kernel/rcu/update.c:248:2-8: preceding lock on line 244 (fwd)
PATCH 8/8 kernel/rcu/update.c:248:2-8: preceding lock on line 244 (fwd)
Is it correct ro leave the function with the lock held on line 248?
julia
---------- Forwarded message ----------
Date: Sun, 5 Mar 2023 19:31:59 +0800
From: kernel test robot <[email protected]>
To: [email protected]
Cc: [email protected], Julia Lawall <[email protected]>
Subject: [jfern:staging 8/8] kernel/rcu/update.c:248:2-8: preceding lock on line
244
BCC: [email protected]
CC: [email protected]
TO: "Joel Fernandes (Google)" <[email protected]>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jfern/linux.git staging head: e6d2024fa329f41ffba24f06090ea57e3b0041ed commit: e6d2024fa329f41ffba24f06090ea57e3b0041ed [8/8] rcu: Add a minimum time for marking boot as completed
:::::: branch date: 2 days ago
:::::: commit date: 2 days ago
config: csky-randconfig-c034-20230305 (https://download.01.org/0day-ci/archive/20230305/[email protected]/config)
compiler: csky-linux-gcc (GCC) 12.1.0
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <[email protected]> | Reported-by: Julia Lawall <[email protected]> | Link: https://lore.kernel.org/r/[email protected]/
cocci warnings: (new ones prefixed by >>)
Quoted 1 line
Quoted 1 line
kernel/rcu/update.c:248:2-8: preceding lock on line 244
vim +248 kernel/rcu/update.c
e6d2024fa329f4 Joel Fernandes (Google 2023-02-25 241)
ee42571f4381f1 Paul E. McKenney 2015-02-19 242 void rcu_end_inkernel_boot(void)
ee42571f4381f1 Paul E. McKenney 2015-02-19 243 {
e6d2024fa329f4 Joel Fernandes (Google 2023-02-25 @244) mutex_lock(&rcu_boot_end_lock);
e6d2024fa329f4 Joel Fernandes (Google 2023-02-25 245) rcu_boot_end_called = true;
e6d2024fa329f4 Joel Fernandes (Google 2023-02-25 246)
e6d2024fa329f4 Joel Fernandes (Google 2023-02-25 247) if (rcu_boot_ended)
e6d2024fa329f4 Joel Fernandes (Google 2023-02-25 @248) return;
e6d2024fa329f4 Joel Fernandes (Google 2023-02-25 249)
e6d2024fa329f4 Joel Fernandes (Google 2023-02-25 250) if (rcu_boot_end_delay) {
e6d2024fa329f4 Joel Fernandes (Google 2023-02-25 251) u64 boot_ms = div_u64(ktime_get_boot_fast_ns(), 1000000UL);
e6d2024fa329f4 Joel Fernandes (Google 2023-02-25 252)
e6d2024fa329f4 Joel Fernandes (Google 2023-02-25 253) if (boot_ms < rcu_boot_end_delay) {
e6d2024fa329f4 Joel Fernandes (Google 2023-02-25 254) schedule_delayed_work(&rcu_boot_end_work,
e6d2024fa329f4 Joel Fernandes (Google 2023-02-25 255) rcu_boot_end_delay - boot_ms);
e6d2024fa329f4 Joel Fernandes (Google 2023-02-25 256) mutex_unlock(&rcu_boot_end_lock);
e6d2024fa329f4 Joel Fernandes (Google 2023-02-25 257) return;
e6d2024fa329f4 Joel Fernandes (Google 2023-02-25 258) }
e6d2024fa329f4 Joel Fernandes (Google 2023-02-25 259) }
e6d2024fa329f4 Joel Fernandes (Google 2023-02-25 260)
e6d2024fa329f4 Joel Fernandes (Google 2023-02-25 261) cancel_delayed_work(&rcu_boot_end_work);
ee42571f4381f1 Paul E. McKenney 2015-02-19 262 rcu_unexpedite_gp();
3e42ec1aa716f1 Paul E. McKenney 2015-11-25 263 if (rcu_normal_after_boot)
3e42ec1aa716f1 Paul E. McKenney 2015-11-25 264 WRITE_ONCE(rcu_normal, 1);
e40bb921119814 Jules Irenge 2020-06-01 265 rcu_boot_ended = true;
e6d2024fa329f4 Joel Fernandes (Google 2023-02-25 266) mutex_unlock(&rcu_boot_end_lock);
ee42571f4381f1 Paul E. McKenney 2015-02-19 267 }
0d39482c3db13a Paul E. McKenney 2015-02-18 268Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests