public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Michael wang <wangyun@linux.vnet.ibm.com>
To: Sasha Levin <sasha.levin@oracle.com>,
	Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@kernel.org>, Dave Jones <davej@redhat.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: sched: fair: NULL ptr deref in check_preempt_wakeup
Date: Thu, 20 Feb 2014 10:22:22 +0800	[thread overview]
Message-ID: <530566DE.3090508@linux.vnet.ibm.com> (raw)
In-Reply-To: <5304F38E.3090701@oracle.com>

On 02/20/2014 02:10 AM, Sasha Levin wrote:
> On 02/17/2014 09:26 PM, Michael wang wrote:
>> On 02/17/2014 05:20 PM, Peter Zijlstra wrote:
>> [snip]
>>>> >>  static void switched_to_fair(struct rq *rq, struct task_struct *p)
>>>> >>  {
>>>> >>-    if (!p->se.on_rq)
>>>> >>+    struct sched_entity *se = &p->se;
>>>> >>+#ifdef CONFIG_FAIR_GROUP_SCHED
>>>> >>+    se->depth = se->parent ? se->parent->depth + 1 : 0;
>>>> >>+#endif
>>>> >>+    if (!se->on_rq)
>>>> >>          return;
>>>> >>
>>>> >>      /*
>>> >
>>> >Yes indeed. My first idea yesterday was to put it in set_task_rq()
>>> to be
>>> >absolutely sure we catch all; but if this is sufficient its better.
>> Agree, let's wait for Sasha's testing result then:)
> 
> I took my time with testing it seems I'm hitting new issues with both
> sched and mm, and I've wanted to confirm I don't see this one any more.
> 
> It does seem like this patch fixes the problem for me, so:
> 
>     Tested-by: Sasha Levin <sasha.levin@oracle.com>

Thanks for the testing :) will post the patch later.

Regards,
Michael Wang

> 
> 
> Thanks,
> Sasha
> 


  parent reply	other threads:[~2014-02-20  2:22 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-15 23:27 sched: fair: NULL ptr deref in check_preempt_wakeup Sasha Levin
2014-02-15 23:32 ` Sasha Levin
2014-02-16 19:19 ` Peter Zijlstra
2014-02-17  8:11 ` Michael wang
2014-02-17  9:20   ` Peter Zijlstra
2014-02-18  2:26     ` Michael wang
2014-02-19 18:10       ` Sasha Levin
2014-02-19 18:37         ` Peter Zijlstra
2014-02-20  2:22         ` Michael wang [this message]
2014-02-17 21:07   ` Sasha Levin
2014-02-18  2:28     ` Michael wang
2014-02-19 16:16   ` Peter Zijlstra
2014-02-20  2:18     ` Michael wang

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=530566DE.3090508@linux.vnet.ibm.com \
    --to=wangyun@linux.vnet.ibm.com \
    --cc=davej@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=sasha.levin@oracle.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