All of lore.kernel.org
 help / color / mirror / Atom feed
* [android-common:android-4.19-stable 2/2] kernel/jump_label.c:207:5-24: atomic_dec_and_test variation before object free at line 210.
@ 2021-02-26 15:31 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-02-26 15:31 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 3468 bytes --]

CC: kbuild-all(a)lists.01.org
TO: cros-kernel-buildreports(a)googlegroups.com

tree:   https://android.googlesource.com/kernel/common android-4.19-stable
head:   e90dc48804e35af100f5a6f435c388d859dfd78f
commit: e90dc48804e35af100f5a6f435c388d859dfd78f [2/2] UPSTREAM: locking/static_key: Fix false positive warnings on concurrent dec/inc
:::::: branch date: 20 hours ago
:::::: commit date: 20 hours ago
config: arm64-randconfig-c003-20210226 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Julia Lawall <julia.lawall@lip6.fr>


"coccinelle warnings: (new ones prefixed by >>)"
>> kernel/jump_label.c:207:5-24: atomic_dec_and_test variation before object free at line 210.

vim +207 kernel/jump_label.c

1dbb6704de91b1 Paolo Bonzini  2017-08-01  184  
ce48c146495a1a Peter Zijlstra 2018-01-22  185  static void __static_key_slow_dec_cpuslocked(struct static_key *key,
8b7b412807053a Marc Zyngier   2017-08-01  186  					   unsigned long rate_limit,
8b7b412807053a Marc Zyngier   2017-08-01  187  					   struct delayed_work *work)
bf5438fca2950b Jason Baron    2010-09-17  188  {
e90dc48804e35a Peter Zijlstra 2019-03-19  189  	int val;
e90dc48804e35a Peter Zijlstra 2019-03-19  190  
549a2d6034b5dd Peter Zijlstra 2018-07-31  191  	lockdep_assert_cpus_held();
549a2d6034b5dd Peter Zijlstra 2018-07-31  192  
4c5ea0a9cd02d6 Paolo Bonzini  2016-06-21  193  	/*
4c5ea0a9cd02d6 Paolo Bonzini  2016-06-21  194  	 * The negative count check is valid even when a negative
4c5ea0a9cd02d6 Paolo Bonzini  2016-06-21  195  	 * key->enabled is in use by static_key_slow_inc(); a
4c5ea0a9cd02d6 Paolo Bonzini  2016-06-21  196  	 * __static_key_slow_dec() before the first static_key_slow_inc()
4c5ea0a9cd02d6 Paolo Bonzini  2016-06-21  197  	 * returns is unbalanced, because all other static_key_slow_inc()
4c5ea0a9cd02d6 Paolo Bonzini  2016-06-21  198  	 * instances block while the update is in progress.
4c5ea0a9cd02d6 Paolo Bonzini  2016-06-21  199  	 */
e90dc48804e35a Peter Zijlstra 2019-03-19  200  	val = atomic_fetch_add_unless(&key->enabled, -1, 1);
e90dc48804e35a Peter Zijlstra 2019-03-19  201  	if (val != 1) {
e90dc48804e35a Peter Zijlstra 2019-03-19  202  		WARN(val < 0, "jump label: negative count!\n");
d430d3d7e646eb Jason Baron    2011-03-16  203  		return;
fadf0464b83f91 Jason Baron    2012-02-21  204  	}
bf5438fca2950b Jason Baron    2010-09-17  205  
e90dc48804e35a Peter Zijlstra 2019-03-19  206  	jump_label_lock();
e90dc48804e35a Peter Zijlstra 2019-03-19 @207  	if (atomic_dec_and_test(&key->enabled)) {
b202952075f626 Gleb Natapov   2011-11-27  208  		if (rate_limit) {
b202952075f626 Gleb Natapov   2011-11-27  209  			atomic_inc(&key->enabled);
b202952075f626 Gleb Natapov   2011-11-27 @210  			schedule_delayed_work(work, rate_limit);
c5905afb0ee655 Ingo Molnar    2012-02-24  211  		} else {
706249c222f684 Peter Zijlstra 2015-07-24  212  			jump_label_update(key);
c5905afb0ee655 Ingo Molnar    2012-02-24  213  		}
e90dc48804e35a Peter Zijlstra 2019-03-19  214  	}
91bad2f8d30574 Jason Baron    2010-10-01  215  	jump_label_unlock();
8b7b412807053a Marc Zyngier   2017-08-01  216  }
8b7b412807053a Marc Zyngier   2017-08-01  217  

---
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: 23137 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-02-26 15:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-26 15:31 [android-common:android-4.19-stable 2/2] kernel/jump_label.c:207:5-24: atomic_dec_and_test variation before object free at line 210 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.