From: kernel test robot <lkp@intel.com>
To: buckzhang1212@yeah.net, Ingo Molnar <mingo@redhat.com>,
Will Deacon <will@kernel.org>, Boqun Feng <boqun.feng@gmail.com>,
Waiman Long <longman@redhat.com>,
linux-kernel@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev, buckzhang1212@yeah.net
Subject: Re: [PATCH] locking/mutex:add MUTEX_CHCEK_INIT to detect uninitialized mutex lock
Date: Thu, 25 Sep 2025 00:15:17 +0800 [thread overview]
Message-ID: <202509242322.VggjpcD5-lkp@intel.com> (raw)
In-Reply-To: <20250924022500.2577-1-buckzhang1212@yeah.net>
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@intel.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
prev parent reply other threads:[~2025-09-24 16:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-24 2:25 [PATCH] locking/mutex:add MUTEX_CHCEK_INIT to detect uninitialized mutex lock buckzhang1212
2025-09-24 3:10 ` Waiman Long
2025-09-24 6:58 ` Peter Zijlstra
[not found] ` <377cba8b.2bd3a.19979cf5b04.Coremail.buckzhang1212@yeah.net>
2025-09-24 14:22 ` Waiman Long
2025-09-24 16:15 ` kernel test robot [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202509242322.VggjpcD5-lkp@intel.com \
--to=lkp@intel.com \
--cc=boqun.feng@gmail.com \
--cc=buckzhang1212@yeah.net \
--cc=linux-kernel@vger.kernel.org \
--cc=longman@redhat.com \
--cc=mingo@redhat.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox