From: Mike Galbraith <efault@gmx.de>
To: Frederik Deweerdt <deweerdt@free.fr>
Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
suresh.b.siddha@intel.com, Ingo Molnar <mingo@elte.hu>,
Andi Kleen <andi@firstfloor.org>
Subject: Re: BUG: unable to handle kernel NULL pointer dereference at 00000002
Date: Tue, 29 Jul 2008 06:22:15 +0200 [thread overview]
Message-ID: <1217305335.5553.3.camel@marge.simson.net> (raw)
In-Reply-To: <20080728222643.GA6339@slug>
On Tue, 2008-07-29 at 00:26 +0200, Frederik Deweerdt wrote:
> Hello Aneesh,
>
> On Fri, Jul 25, 2008 at 03:23:17PM +0530, Aneesh Kumar K.V wrote:
> > [ 163.378265] BUG: unable to handle kernel NULL pointer dereference at 00000002
> > [ 163.378276] IP: [<c0124933>] sched_power_savings_store+0x13/0x70
>
> Does the attached patch solve the problem?
Patch seems to have missed the boat for rc1 too.
>
> Regards,
> Frederik
>
> diff --git a/kernel/sched.c b/kernel/sched.c
> index 0047bd9..090b397 100644
> --- a/kernel/sched.c
> +++ b/kernel/sched.c
> @@ -7643,34 +7643,30 @@ static ssize_t sched_power_savings_store(const char *buf, size_t count, int smt)
> }
>
> #ifdef CONFIG_SCHED_MC
> -static ssize_t sched_mc_power_savings_show(struct sys_device *dev,
> - struct sysdev_attribute *attr, char *page)
> +static ssize_t sched_mc_power_savings_show(struct sysdev_class *cls, char *page)
> {
> return sprintf(page, "%u\n", sched_mc_power_savings);
> }
> -static ssize_t sched_mc_power_savings_store(struct sys_device *dev,
> - struct sysdev_attribute *attr,
> +static ssize_t sched_mc_power_savings_store(struct sysdev_class *cls,
> const char *buf, size_t count)
> {
> return sched_power_savings_store(buf, count, 0);
> }
> -static SYSDEV_ATTR(sched_mc_power_savings, 0644, sched_mc_power_savings_show,
> +static SYSDEV_CLASS_ATTR(sched_mc_power_savings, 0644, sched_mc_power_savings_show,
> sched_mc_power_savings_store);
> #endif
>
> #ifdef CONFIG_SCHED_SMT
> -static ssize_t sched_smt_power_savings_show(struct sys_device *dev,
> - struct sysdev_attribute *attr, char *page)
> +static ssize_t sched_smt_power_savings_show(struct sysdev_class *cls, char *page)
> {
> return sprintf(page, "%u\n", sched_smt_power_savings);
> }
> -static ssize_t sched_smt_power_savings_store(struct sys_device *dev,
> - struct sysdev_attribute *attr,
> +static ssize_t sched_smt_power_savings_store(struct sysdev_class *cls,
> const char *buf, size_t count)
> {
> return sched_power_savings_store(buf, count, 1);
> }
> -static SYSDEV_ATTR(sched_smt_power_savings, 0644, sched_smt_power_savings_show,
> +static SYSDEV_CLASS_ATTR(sched_smt_power_savings, 0644, sched_smt_power_savings_show,
> sched_smt_power_savings_store);
> #endif
>
> @@ -7680,13 +7676,13 @@ int sched_create_sysfs_power_savings_entries(struct sysdev_class *cls)
>
> #ifdef CONFIG_SCHED_SMT
> if (smt_capable())
> - err = sysfs_create_file(&cls->kset.kobj,
> - &attr_sched_smt_power_savings.attr);
> + err = sysdev_class_create_file(cls,
> + &attr_sched_smt_power_savings);
> #endif
> #ifdef CONFIG_SCHED_MC
> if (!err && mc_capable())
> - err = sysfs_create_file(&cls->kset.kobj,
> - &attr_sched_mc_power_savings.attr);
> + err = sysdev_class_create_file(cls,
> + &attr_sched_mc_power_savings);
> #endif
> return err;
> }
next prev parent reply other threads:[~2008-07-29 4:22 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-25 9:53 BUG: unable to handle kernel NULL pointer dereference at 00000002 Aneesh Kumar K.V
2008-07-28 22:26 ` Frederik Deweerdt
2008-07-29 4:22 ` Mike Galbraith [this message]
2008-07-29 12:09 ` Andi Kleen
2008-07-29 13:56 ` Arjan van de Ven
2008-07-29 14:53 ` Andi Kleen
2008-07-29 15:30 ` Arjan van de Ven
2008-07-29 16:31 ` Andi Kleen
2008-07-29 17:22 ` Arjan van de Ven
2008-07-29 17:50 ` Andi Kleen
2008-07-30 9:05 ` Ingo Molnar
2008-07-30 9:26 ` Andrew Morton
2008-07-30 16:31 ` Greg KH
-- strict thread matches above, loose matches on Subject: below --
2012-06-14 17:45 Pierre-Philipp Braun
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=1217305335.5553.3.camel@marge.simson.net \
--to=efault@gmx.de \
--cc=andi@firstfloor.org \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=deweerdt@free.fr \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=suresh.b.siddha@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.