mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Dave Young" <hidave.darkstar@gmail.com>
To: dpn@isomerica.net
Cc: "Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	mingo@elte.hu
Subject: Re: NULL dereference OOPS on SysRq-w
Date: Mon, 28 Apr 2008 15:08:36 +0800	[thread overview]
Message-ID: <a8e1da0804280008s38d3b16vfedb3860cd7d5222@mail.gmail.com> (raw)
In-Reply-To: <48157664.2060302@isomerica.net>

On Mon, Apr 28, 2008 at 3:01 PM, Dan Noe <dpn@isomerica.net> wrote:
> Dave Young wrote:
>
> > [snip]
> >
> > I have a fix for the NULL pointer reference BUG, tested on my pc.
> > ---
> >
> > "m" will be NULL if seq_printf & seq_puts is called from sched_debug_show
> > Use SEQ_* macros to fix it
> > Signed-off-by: Dave Young <hidave.darkstar@gmail.com>
> >
>
>  There is actually already a patch out for this which simply hasn't made it
> upstream yet - Mike Galbraith emailed me with it and it indeed fixes the
> problem.  I hadn't realized his email didn't go to lkml.. otherwise I would
> have echoed that here to avoid wasting people's time.  My apologies.

Ok, thanks.

While debuging this issue I found another BUG about sysrq,

echo w >/proc/sys/kernel/sysrq
My system hangs, there's no response from then on.

>
>  Cheers,
>  Dan
>
>  ===
>
>  Here is his message:
>
>  From: efault@gmx.de
>
>  Peter's fix didn't make it up-stream.
>
>  Subject: sched: fix oops
>
>  sched_debug uses SEQ_printf to use printk when the seqfile 'm' is NULL.
>  Instead of doing that here too; choose to not output the weight tree
>  to cut back on output.
>
>  Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
>  ---
>  diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
>  index 89fa32b..353a481 100644
>  --- a/kernel/sched_fair.c
>  +++ b/kernel/sched_fair.c
>  @@ -1643,8 +1643,10 @@ static void print_cfs_stats(struct seq_file *m, int
> cpu)
>
>         for_each_leaf_cfs_rq(cpu_rq(cpu), cfs_rq)
>                 print_cfs_rq(m, cpu, cfs_rq);
>
>  -       seq_printf(m, "\nWeight tree:\n");
>  -       print_cfs_rq_tasks(m, &cpu_rq(cpu)->cfs, 1);
>  +       if (m) {
>  +               seq_printf(m, "\nWeight tree:\n");
>
>  +               print_cfs_rq_tasks(m, &cpu_rq(cpu)->cfs, 1);
>  +       }
>         rcu_read_unlock();
>   }
>   #endif
>
>
>
>
>  --
>                     /--------------- - -  -  -   -   -
>                     |  Dan Noe
>                     |  http://isomerica.net/~dpn/
>

  reply	other threads:[~2008-04-28  7:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-27  6:36 Dan Noe
2008-04-28  6:57 ` Dave Young
2008-04-28  7:01   ` Dan Noe
2008-04-28  7:08     ` Dave Young [this message]
2008-04-28  7:26       ` Dave Young

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=a8e1da0804280008s38d3b16vfedb3860cd7d5222@mail.gmail.com \
    --to=hidave.darkstar@gmail.com \
    --cc=dpn@isomerica.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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

all inboxes | Powered by JetHome®