From: kernel test robot <lkp@intel.com>
To: Shrikanth Hegde <sshegde@linux.ibm.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
0day robot <lkp@intel.com>
Subject: kernel/sched/core.c:11335:2: warning: releasing raw_spinlock 'rq_lockp(rq)' that was not held
Date: Thu, 18 Jun 2026 09:10:53 +0200 [thread overview]
Message-ID: <202606180950.swwWuXxx-lkp@intel.com> (raw)
tree: https://github.com/intel-lab-lkp/linux/commits/Shrikanth-Hegde/sched-debug-Remove-unused-schedstats/20260618-031604
head: bcb0c494e4af36dd6306a5a1839a0c03046053af
commit: bec9f392fa50016e604cfacae7445d9c36729f49 sched/core: Push current task from non preferred CPU
date: 12 hours ago
config: x86_64-kexec (https://download.01.org/0day-ci/archive/20260618/202606180950.swwWuXxx-lkp@intel.com/config)
compiler: clang version 22.1.8 (https://github.com/llvm/llvm-project ca7933e47d3a3451d81e72ac174dcb5aa28b59d1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260618/202606180950.swwWuXxx-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/202606180950.swwWuXxx-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> kernel/sched/core.c:11335:2: warning: releasing raw_spinlock 'rq_lockp(rq)' that was not held [-Wthread-safety-analysis]
11335 | rq_unlock(rq, &rf);
| ^
>> kernel/sched/core.c:11340:1: warning: raw_spinlock 'rq_lockp(__this_rq())' is not held on every path through here [-Wthread-safety-analysis]
11340 | }
| ^
kernel/sched/core.c:11325:2: note: raw_spinlock acquired here
11325 | rq_lock(rq, &rf);
| ^
2 warnings generated.
vim +11335 kernel/sched/core.c
11312
11313 static int sched_non_preferred_cpu_push_stop(void *arg)
11314 {
11315 struct task_struct *p = arg;
11316 struct rq *rq = this_rq();
11317 struct rq_flags rf;
11318 int cpu;
11319
11320 /* sanity check */
11321 if (cpu_preferred(rq->cpu))
11322 return 0;
11323
11324 raw_spin_lock_irq(&p->pi_lock);
11325 rq_lock(rq, &rf);
11326 rq->push_task_work_done = 0;
11327
11328 update_rq_clock(rq);
11329
11330 if (task_rq(p) == rq && task_on_rq_queued(p)) {
11331 cpu = select_fallback_rq(rq->cpu, p);
11332 rq = __migrate_task(rq, &rf, p, cpu);
11333 }
11334
11335 rq_unlock(rq, &rf);
11336 raw_spin_unlock_irq(&p->pi_lock);
11337 put_task_struct(p);
11338
11339 return 0;
11340 }
11341
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-06-18 7:11 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202606180950.swwWuXxx-lkp@intel.com \
--to=lkp@intel.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=sshegde@linux.ibm.com \
/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