Re: Bug in dmi_get_year (causing apic not getting enabled)

From: Jiri Slaby
Date: Wed Jul 08 2009 - 02:47:44 EST


On 07/08/2009 07:36 AM, Eric W. Biederman wrote:
> Matthias Pfaller <leo@xxxxxxxx> writes:
>
>> Hi,
>>
>> dmi_get_year extracts the year with:
>>
>> simple_strtoul(s, NULL, 0);
>>
>> for biosdates in 2008 and 2009 this will return 0 because 8 and 9 are no valid
>> octal digits. This will e.g. result in the apic not getting enabled.
>> Changing this to
>>
>> simple_strtoul(s, NULL, 10);
>>
>> should fix the problem.
>
> Only if there is a leading 0....

Yes, 4-digit year is required as of smbios 2.3 (1998). There are broken
BIOSes out there though. So there is no need to guess base if we know
it. I sent a fix for this yesterday. Any objections?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/