diff mbox

[BUG,3.12.rc4] Oops: unable to handle kernel paging request during shutdown

Message ID 1529148.xq0P7G6L83@vostro.rjw.lan (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Rafael J. Wysocki Oct. 25, 2013, 11:10 a.m. UTC
On Friday, October 25, 2013 11:07:40 AM Linus Torvalds wrote:
> On Fri, Oct 25, 2013 at 11:10 AM, Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
> > On Friday, October 25, 2013 11:51:40 AM Rafael J. Wysocki wrote:
> >
> >         /* don't keep reloading if cpufreq_driver exists */
> >         if (cpufreq_get_current_driver())
> > -               return 0;
> > +               return -EEXIST;
> >
> >         if (acpi_disabled)
> > -               return 0;
> > +               return -ENODEV;
> >
> >         pr_debug("acpi_cpufreq_init\n");
> 
> I think:
> 
>  - EBUSY is a better error return than EEXIST here/

My concern about using -EBUSY here was that it might be interpreted as
"try again" by things like udev (which is not what I want to happen).

>   - do the ENODEV case first, because claiming something is busy when
> you couldn't have used it anyway is kind of stupid)

Agreed.

> but yeah, this looks like the right thing. Let's make sure there
> aren't any annoying error messages etc printed out as a result of
> this, though.

Updated patch is appended.

Rafael


---
 drivers/cpufreq/acpi-cpufreq.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)


--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Viresh Kumar Oct. 25, 2013, 1:49 p.m. UTC | #1
On 25 October 2013 16:40, Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
> ---
>  drivers/cpufreq/acpi-cpufreq.c |    8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> Index: linux-pm/drivers/cpufreq/acpi-cpufreq.c
> ===================================================================
> --- linux-pm.orig/drivers/cpufreq/acpi-cpufreq.c
> +++ linux-pm/drivers/cpufreq/acpi-cpufreq.c
> @@ -986,12 +986,12 @@ static int __init acpi_cpufreq_init(void
>  {
>         int ret;
>
> +       if (acpi_disabled)
> +               return -ENODEV;
> +
>         /* don't keep reloading if cpufreq_driver exists */
>         if (cpufreq_get_current_driver())
> -               return 0;
> -
> -       if (acpi_disabled)
> -               return 0;
> +               return -EEXIST;
>
>         pr_debug("acpi_cpufreq_init\n");

Even better,

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Rafael J. Wysocki Oct. 25, 2013, 2:21 p.m. UTC | #2
On Friday, October 25, 2013 07:19:57 PM Viresh Kumar wrote:
> On 25 October 2013 16:40, Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
> > ---
> >  drivers/cpufreq/acpi-cpufreq.c |    8 ++++----
> >  1 file changed, 4 insertions(+), 4 deletions(-)
> >
> > Index: linux-pm/drivers/cpufreq/acpi-cpufreq.c
> > ===================================================================
> > --- linux-pm.orig/drivers/cpufreq/acpi-cpufreq.c
> > +++ linux-pm/drivers/cpufreq/acpi-cpufreq.c
> > @@ -986,12 +986,12 @@ static int __init acpi_cpufreq_init(void
> >  {
> >         int ret;
> >
> > +       if (acpi_disabled)
> > +               return -ENODEV;
> > +
> >         /* don't keep reloading if cpufreq_driver exists */
> >         if (cpufreq_get_current_driver())
> > -               return 0;
> > -
> > -       if (acpi_disabled)
> > -               return 0;
> > +               return -EEXIST;
> >
> >         pr_debug("acpi_cpufreq_init\n");
> 
> Even better,
> 
> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

It doesn't lead to any unpleasant side effects on my laptop, so I'm adding it
to my queue of fixes for 3.12-rc7.

Thanks!
diff mbox

Patch

Index: linux-pm/drivers/cpufreq/acpi-cpufreq.c
===================================================================
--- linux-pm.orig/drivers/cpufreq/acpi-cpufreq.c
+++ linux-pm/drivers/cpufreq/acpi-cpufreq.c
@@ -986,12 +986,12 @@  static int __init acpi_cpufreq_init(void
 {
 	int ret;
 
+	if (acpi_disabled)
+		return -ENODEV;
+
 	/* don't keep reloading if cpufreq_driver exists */
 	if (cpufreq_get_current_driver())
-		return 0;
-
-	if (acpi_disabled)
-		return 0;
+		return -EEXIST;
 
 	pr_debug("acpi_cpufreq_init\n");