All of lore.kernel.org
 help / color / mirror / Atom feed
* [android-common:android14-5.15 2/2] kernel/futex/core.c:1688 futex_wake() error: uninitialized symbol 'target_nr'.
@ 2025-01-26 18:03 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-01-26 18:03 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp, Dan Carpenter

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: cros-kernel-buildreports@googlegroups.com

tree:   https://android.googlesource.com/kernel/common android14-5.15
head:   49bd830ea5e30f59495e703aae18331882b76760
commit: e5d032fb33baca48e1f0bdbf0f71ba74017dddeb [2/2] ANDROID: vendor_hooks: Add hooks for oem futex optimization
:::::: branch date: 24 hours ago
:::::: commit date: 1 year, 9 months ago
config: i386-randconfig-141-20250126 (https://download.01.org/0day-ci/archive/20250127/202501270227.yGDem2Zo-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202501270227.yGDem2Zo-lkp@intel.com/

smatch warnings:
kernel/futex/core.c:1688 futex_wake() error: uninitialized symbol 'target_nr'.

vim +/target_nr +1688 kernel/futex/core.c

5eb3dc62fc5986 kernel/futex.c      Darren Hart     2009-03-12  1647  
^1da177e4c3f41 kernel/futex.c      Linus Torvalds  2005-04-16  1648  /*
b2d0994b1301fc kernel/futex.c      Darren Hart     2009-03-12  1649   * Wake up waiters matching bitset queued on this futex (uaddr).
^1da177e4c3f41 kernel/futex.c      Linus Torvalds  2005-04-16  1650   */
b41277dc7a18ee kernel/futex.c      Darren Hart     2010-11-08  1651  static int
b41277dc7a18ee kernel/futex.c      Darren Hart     2010-11-08  1652  futex_wake(u32 __user *uaddr, unsigned int flags, int nr_wake, u32 bitset)
^1da177e4c3f41 kernel/futex.c      Linus Torvalds  2005-04-16  1653  {
e2970f2fb69501 kernel/futex.c      Ingo Molnar     2006-06-27  1654  	struct futex_hash_bucket *hb;
^1da177e4c3f41 kernel/futex.c      Linus Torvalds  2005-04-16  1655  	struct futex_q *this, *next;
38d47c1b7075bd kernel/futex.c      Peter Zijlstra  2008-09-26  1656  	union futex_key key = FUTEX_KEY_INIT;
^1da177e4c3f41 kernel/futex.c      Linus Torvalds  2005-04-16  1657  	int ret;
e5d032fb33baca kernel/futex/core.c xieliujie       2023-04-24  1658  	int target_nr;
194a6b5b9cb6b9 kernel/futex.c      Waiman Long     2016-11-17  1659  	DEFINE_WAKE_Q(wake_q);
^1da177e4c3f41 kernel/futex.c      Linus Torvalds  2005-04-16  1660  
cd689985cf49f6 kernel/futex.c      Thomas Gleixner 2008-02-01  1661  	if (!bitset)
cd689985cf49f6 kernel/futex.c      Thomas Gleixner 2008-02-01  1662  		return -EINVAL;
cd689985cf49f6 kernel/futex.c      Thomas Gleixner 2008-02-01  1663  
96d4f267e40f95 kernel/futex.c      Linus Torvalds  2019-01-03  1664  	ret = get_futex_key(uaddr, flags & FLAGS_SHARED, &key, FUTEX_READ);
^1da177e4c3f41 kernel/futex.c      Linus Torvalds  2005-04-16  1665  	if (unlikely(ret != 0))
d7c5ed73b19c46 kernel/futex.c      André Almeida   2020-07-02  1666  		return ret;
^1da177e4c3f41 kernel/futex.c      Linus Torvalds  2005-04-16  1667  
e2970f2fb69501 kernel/futex.c      Ingo Molnar     2006-06-27  1668  	hb = hash_futex(&key);
b0c29f79ecea0b kernel/futex.c      Davidlohr Bueso 2014-01-12  1669  
b0c29f79ecea0b kernel/futex.c      Davidlohr Bueso 2014-01-12  1670  	/* Make sure we really have tasks to wakeup */
b0c29f79ecea0b kernel/futex.c      Davidlohr Bueso 2014-01-12  1671  	if (!hb_waiters_pending(hb))
d7c5ed73b19c46 kernel/futex.c      André Almeida   2020-07-02  1672  		return ret;
b0c29f79ecea0b kernel/futex.c      Davidlohr Bueso 2014-01-12  1673  
e2970f2fb69501 kernel/futex.c      Ingo Molnar     2006-06-27  1674  	spin_lock(&hb->lock);
^1da177e4c3f41 kernel/futex.c      Linus Torvalds  2005-04-16  1675  
e5d032fb33baca kernel/futex/core.c xieliujie       2023-04-24  1676  	trace_android_vh_futex_wake_traverse_plist(&hb->chain, &target_nr, key, bitset);
0d00c7b20c7716 kernel/futex.c      Jason Low       2014-01-12  1677  	plist_for_each_entry_safe(this, next, &hb->chain, list) {
^1da177e4c3f41 kernel/futex.c      Linus Torvalds  2005-04-16  1678  		if (match_futex (&this->key, &key)) {
52400ba946759a kernel/futex.c      Darren Hart     2009-04-03  1679  			if (this->pi_state || this->rt_waiter) {
ed6f7b10e657b9 kernel/futex.c      Ingo Molnar     2006-07-01  1680  				ret = -EINVAL;
ed6f7b10e657b9 kernel/futex.c      Ingo Molnar     2006-07-01  1681  				break;
ed6f7b10e657b9 kernel/futex.c      Ingo Molnar     2006-07-01  1682  			}
cd689985cf49f6 kernel/futex.c      Thomas Gleixner 2008-02-01  1683  
cd689985cf49f6 kernel/futex.c      Thomas Gleixner 2008-02-01  1684  			/* Check if one of the bits is set in both bitsets */
cd689985cf49f6 kernel/futex.c      Thomas Gleixner 2008-02-01  1685  			if (!(this->bitset & bitset))
cd689985cf49f6 kernel/futex.c      Thomas Gleixner 2008-02-01  1686  				continue;
cd689985cf49f6 kernel/futex.c      Thomas Gleixner 2008-02-01  1687  
e5d032fb33baca kernel/futex/core.c xieliujie       2023-04-24 @1688  			trace_android_vh_futex_wake_this(ret, nr_wake, target_nr, this->task);
1d0dcb3ad9d336 kernel/futex.c      Davidlohr Bueso 2015-05-01  1689  			mark_wake_futex(&wake_q, this);
^1da177e4c3f41 kernel/futex.c      Linus Torvalds  2005-04-16  1690  			if (++ret >= nr_wake)
^1da177e4c3f41 kernel/futex.c      Linus Torvalds  2005-04-16  1691  				break;
^1da177e4c3f41 kernel/futex.c      Linus Torvalds  2005-04-16  1692  		}
^1da177e4c3f41 kernel/futex.c      Linus Torvalds  2005-04-16  1693  	}
^1da177e4c3f41 kernel/futex.c      Linus Torvalds  2005-04-16  1694  
e2970f2fb69501 kernel/futex.c      Ingo Molnar     2006-06-27  1695  	spin_unlock(&hb->lock);
1d0dcb3ad9d336 kernel/futex.c      Davidlohr Bueso 2015-05-01  1696  	wake_up_q(&wake_q);
e5d032fb33baca kernel/futex/core.c xieliujie       2023-04-24  1697  	trace_android_vh_futex_wake_up_q_finish(nr_wake, target_nr);
^1da177e4c3f41 kernel/futex.c      Linus Torvalds  2005-04-16  1698  	return ret;
^1da177e4c3f41 kernel/futex.c      Linus Torvalds  2005-04-16  1699  }
^1da177e4c3f41 kernel/futex.c      Linus Torvalds  2005-04-16  1700  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

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

only message in thread, other threads:[~2025-01-26 18:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-26 18:03 [android-common:android14-5.15 2/2] kernel/futex/core.c:1688 futex_wake() error: uninitialized symbol 'target_nr' 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.