[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202509242322.VggjpcD5-lkp@intel.com>
Date: Thu, 25 Sep 2025 00:15:17 +0800
From: kernel test robot <lkp@...el.com>
To: buckzhang1212@...h.net, Ingo Molnar <mingo@...hat.com>,
Will Deacon <will@...nel.org>, Boqun Feng <boqun.feng@...il.com>,
Waiman Long <longman@...hat.com>, linux-kernel@...r.kernel.org
Cc: oe-kbuild-all@...ts.linux.dev, buckzhang1212@...h.net
Subject: Re: [PATCH] locking/mutex:add MUTEX_CHCEK_INIT to detect
uninitialized mutex lock
Hi,
kernel test robot noticed the following build warnings:
[auto build test WARNING on tip/locking/core]
[also build test WARNING on linus/master v6.17-rc7 next-20250923]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/buckzhang1212-yeah-net/locking-mutex-add-MUTEX_CHCEK_INIT-to-detect-uninitialized-mutex-lock/20250924-103805
base: tip/locking/core
patch link: https://lore.kernel.org/r/20250924022500.2577-1-buckzhang1212%40yeah.net
patch subject: [PATCH] locking/mutex:add MUTEX_CHCEK_INIT to detect uninitialized mutex lock
config: i386-randconfig-014-20250924 (https://download.01.org/0day-ci/archive/20250924/202509242322.VggjpcD5-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250924/202509242322.VggjpcD5-lkp@intel.com/reproduce)
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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202509242322.VggjpcD5-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> kernel/locking/mutex.c:46:13: warning: 'mutex_check_waitlist' defined but not used [-Wunused-function]
46 | static void mutex_check_waitlist(struct mutex *lock)
| ^~~~~~~~~~~~~~~~~~~~
vim +/mutex_check_waitlist +46 kernel/locking/mutex.c
39
40 #ifdef CONFIG_DEBUG_MUTEXES
41 # define MUTEX_WARN_ON(cond) DEBUG_LOCKS_WARN_ON(cond)
42 #else
43 # define MUTEX_WARN_ON(cond)
44 #endif
45 #define MUTEX_CHCEK_INIT(lock) mutex_check_waitlist(lock)
> 46 static void mutex_check_waitlist(struct mutex *lock)
47 {
48 struct list_head *list = &lock->wait_list;
49
50 if ((unsigned long)list->next < PAGE_OFFSET) {
51 pr_err("BUG: mutex lock is uninitialized,wait_list is Error\n");
52 MUTEX_WARN_ON("mutex lock is uninitialized");
53 }
54 }
55
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists