From: Dan Carpenter <error27@gmail.com>
To: Paul Turner <pjt@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>, linux-kernel@vger.kernel.org
Subject: [smatch] sched_fair: check after dereference
Date: Mon, 20 Dec 2010 09:10:41 +0300 [thread overview]
Message-ID: <20101220061041.GA8512@bicker> (raw)
Hi Paul,
In linux-next e33078baa4 "sched: Fix update_cfs_load() synchronization"
introduced a dereference before the check for NULL. I don't know the
code well enough to say if it's a bug or if the check can be removed.
kernel/sched_fair.c +728 update_cfs_load(6)
warn: variable dereferenced before check 'cfs_rq'
722 static void update_cfs_load(struct cfs_rq *cfs_rq, int global_update)
723 {
724 u64 period = sysctl_sched_shares_window;
725 u64 now, delta;
726 unsigned long load = cfs_rq->load.weight;
^^^^^^^^^^^^^^^^^^^
727
728 if (!cfs_rq)
^^^^^^
729 return;
Can you take a look?
regards,
dan carpenter
next reply other threads:[~2010-12-20 6:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-20 6:10 Dan Carpenter [this message]
2010-12-24 9:17 ` [smatch] sched_fair: check after dereference Paul Turner
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=20101220061041.GA8512@bicker \
--to=error27@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=pjt@google.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