lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 25 Oct 2013 13:10:51 +0200
From:	"Rafael J. Wysocki" <rjw@...ysocki.net>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	Knut Petersen <Knut_Petersen@...nline.de>,
	Ingo Molnar <mingo@...nel.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Paul McKenney <paulmck@...ux.vnet.ibm.com>,
	Frédéric Weisbecker <fweisbec@...il.com>,
	Viresh Kumar <viresh.kumar@...aro.org>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Greg KH <greg@...ah.com>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	cpufreq@...r.kernel.org, Linux PM list <linux-pm@...r.kernel.org>
Subject: Re: [BUG 3.12.rc4] Oops: unable to handle kernel paging request during shutdown

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@...ysocki.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(-)

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");
 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ