From: Dan Carpenter <dan.carpenter@oracle.com>
To: joel@joelfernandes.org
Cc: kernel-janitors@vger.kernel.org
Subject: [bug report] sched: Fix priority inversion of cookied task with sibling
Date: Sat, 15 May 2021 13:39:47 +0300 [thread overview]
Message-ID: <YJ+k86G8TRabcHDx@mwanda> (raw)
Hello Joel Fernandes (Google),
This is a semi-automatic email about new static checker warnings.
The patch 7afbba119f0d: "sched: Fix priority inversion of cookied
task with sibling" from Nov 17, 2020, leads to the following Smatch
complaint:
kernel/sched/core.c:5492 pick_next_task()
error: we previously assumed 'next' could be null (see line 5488)
kernel/sched/core.c
5481 /*
5482 * Optimize for common case where this CPU has no cookies
5483 * and there are no cookied tasks running on siblings.
5484 */
5485 if (!need_sync) {
5486 for_each_class(class) {
5487 next = class->pick_task(rq);
5488 if (next)
5489 break;
Is it possible to go through the whole loop withint finding a next?
5490 }
5491
5492 if (!next->core_cookie) {
^^^^^^^^^^^^^^^^^
I assume not, but I don't read the code, I just forward the warnings
on. I am a bot. Beep Boop!
5493 rq->core_pick = NULL;
5494 /*
5495 * For robustness, update the min_vruntime_fi for
5496 * unconstrained picks as well.
5497 */
5498 WARN_ON_ONCE(fi_before);
5499 task_vruntime_update(rq, next, false);
5500 goto done;
5501 }
5502 }
5503
5504 for_each_cpu(i, smt_mask) {
5505 struct rq *rq_i = cpu_rq(i);
5506
regards,
dan carpenter
reply other threads:[~2021-05-15 10:40 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=YJ+k86G8TRabcHDx@mwanda \
--to=dan.carpenter@oracle.com \
--cc=joel@joelfernandes.org \
--cc=kernel-janitors@vger.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