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] [day] [month] [year] [list]
Date:	Fri, 21 Jan 2011 16:40:13 GMT
From:	tip-bot for Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...hat.com,
	konrad.wilk@...cle.com, johnstul@...ibm.com, tglx@...utronix.de
Subject: [tip:timers/urgent] acpi_pm: Clear pmtmr_ioport if acpi_pm initialization fails

Commit-ID:  db6b175fa6ad1408cbb2fb62949a6d55cfece03e
Gitweb:     http://git.kernel.org/tip/db6b175fa6ad1408cbb2fb62949a6d55cfece03e
Author:     Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
AuthorDate: Fri, 14 Jan 2011 09:47:26 -0800
Committer:  Thomas Gleixner <tglx@...utronix.de>
CommitDate: Fri, 21 Jan 2011 17:38:19 +0100

acpi_pm: Clear pmtmr_ioport if acpi_pm initialization fails

If the acpi pm timer throws invalid data, clear pmtmr_ioport
so the pm timer won't accidentally be used.

This was found when using Xen where there is a acpi pm reported,
but gives bogus values, and other code was continuing to try
to use the pm timer after the initialization failed.

[jstultz: Catch additional failure and reword changelog message. ]

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
Signed-off-by: John Stultz <johnstul@...ibm.com>
LKML-Reference: <1295027246-11110-1-git-send-email-johnstul@...ibm.com>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
---
 drivers/clocksource/acpi_pm.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/drivers/clocksource/acpi_pm.c b/drivers/clocksource/acpi_pm.c
index cfb0f52..effe797 100644
--- a/drivers/clocksource/acpi_pm.c
+++ b/drivers/clocksource/acpi_pm.c
@@ -202,17 +202,21 @@ static int __init init_acpi_pm_clocksource(void)
 			printk(KERN_INFO "PM-Timer had inconsistent results:"
 			       " 0x%#llx, 0x%#llx - aborting.\n",
 			       value1, value2);
+			pmtmr_ioport = 0;
 			return -EINVAL;
 		}
 		if (i == ACPI_PM_READ_CHECKS) {
 			printk(KERN_INFO "PM-Timer failed consistency check "
 			       " (0x%#llx) - aborting.\n", value1);
+			pmtmr_ioport = 0;
 			return -ENODEV;
 		}
 	}
 
-	if (verify_pmtmr_rate() != 0)
+	if (verify_pmtmr_rate() != 0){
+		pmtmr_ioport = 0;
 		return -ENODEV;
+	}
 
 	return clocksource_register_hz(&clocksource_acpi_pm,
 						PMTMR_TICKS_PER_SEC);
--
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