diff options
author | Max Dmitrichenko <dmitrmax@gmail.com> | 2009-11-23 22:52:28 +0300 |
---|---|---|
committer | Willy Tarreau <w@1wt.eu> | 2009-11-25 05:42:47 +0100 |
commit | a07d8a1940dce21de61a9c3e38b887047d8e3629 (patch) | |
tree | 975949cc793ebf28c7171c199b79d3ec5840bc61 | |
parent | e68fabe604752a3dc24d1ed13b82a74e99a63c9b (diff) | |
download | linux-2.4-a07d8a1940dce21de61a9c3e38b887047d8e3629.tar.gz |
dmi: fix year parsing in dmi_check_blacklist()
This patch fixes bug which causes ACPI on BIOSes dated by 2008 and
2009 in 2-digit format (i.e. 08 and 09) to be blacklisted. This
happens because simple_strtoul() with "base" argument of 0 treats
these years as octal thus failing to parse it right. So base argument
must be forced to decimal. The same bug in 2.6 tree was fixed by Tejun
Heo [1].
[1] commit 02c24fa87724bb3af969463cd74dc3b3feb24740
Signed-off-by: Max Dmitrichenko <dmitrmax@gmail.com>
Signed-off-by: Willy Tarreau <w@1wt.eu>
-rw-r--r-- | arch/i386/kernel/dmi_scan.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/i386/kernel/dmi_scan.c b/arch/i386/kernel/dmi_scan.c index 9c27ca2434e853..2c5280cc3e9033 100644 --- a/arch/i386/kernel/dmi_scan.c +++ b/arch/i386/kernel/dmi_scan.c @@ -977,7 +977,7 @@ static __init void dmi_check_blacklist(void) if (s) { int year, disable = 0; s++; - year = simple_strtoul(s,NULL,0); + year = simple_strtoul(s,NULL,10); if (year >= 1000) disable = year < ACPI_BLACKLIST_CUTOFF_YEAR; else if (year < 1 || (year > 90 && year <= 99)) |