From: Lin Ming <ming.m.lin@intel.com>
To: Paul Turner <pjt@google.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
Ingo Molnar <mingo@elte.hu>, lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH -tip] sched: fix uninitialized variable usage
Date: Tue, 30 Nov 2010 12:28:52 +0800 [thread overview]
Message-ID: <1291091332.2405.190.camel@minggr.sh.intel.com> (raw)
In-Reply-To: <AANLkTi=3=ffR3wRAfXsZ6+xABt3+sKJemJ_w-qfa0kf8@mail.gmail.com>
On Tue, 2010-11-30 at 11:54 +0800, Paul Turner wrote:
> On Mon, Nov 29, 2010 at 7:51 PM, Lin Ming <ming.m.lin@intel.com> wrote:
> > linux-2.6/kernel/sched.c: In function ‘sched_destroy_group’:
> > linux-2.6/kernel/sched.c:8101: warning: ‘i’ is used uninitialized in this function
> >
> > This is caused by commit 3d4b47b(Implement on-demand (active) cfs_rq list)
> >
> > Signed-off-by: Lin Ming <ming.m.lin@intel.com>
> > ---
> > kernel/sched.c | 3 +--
> > 1 files changed, 1 insertions(+), 2 deletions(-)
> >
>
> Thanks for the catch!
>
> http://lkml.org/lkml/2010/11/29/566 -- should already address this
OK :)
Thanks.
>
> - Paul
>
>
> > diff --git a/kernel/sched.c b/kernel/sched.c
> > index 717bf7d..c3af198 100644
> > --- a/kernel/sched.c
> > +++ b/kernel/sched.c
> > @@ -8088,7 +8088,6 @@ static inline void unregister_fair_sched_group(struct task_group *tg, int cpu)
> > {
> > struct rq *rq = cpu_rq(cpu);
> > unsigned long flags;
> > - int i;
> >
> > /*
> > * Only empty task groups can be destroyed; so we can speculatively
> > @@ -8098,7 +8097,7 @@ static inline void unregister_fair_sched_group(struct task_group *tg, int cpu)
> > return;
> >
> > raw_spin_lock_irqsave(&rq->lock, flags);
> > - list_del_leaf_cfs_rq(tg->cfs_rq[i]);
> > + list_del_leaf_cfs_rq(tg->cfs_rq[cpu]);
> > raw_spin_unlock_irqrestore(&rq->lock, flags);
> > }
> > #else /* !CONFG_FAIR_GROUP_SCHED */
> >
> >
> >
prev parent reply other threads:[~2010-11-30 4:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-30 3:51 Lin Ming
2010-11-30 3:54 ` Paul Turner
2010-11-30 4:28 ` Lin Ming [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=1291091332.2405.190.camel@minggr.sh.intel.com \
--to=ming.m.lin@intel.com \
--cc=a.p.zijlstra@chello.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--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
Powered by JetHome