linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Bug in dmi_get_year (causing apic not getting enabled)
@ 2009-07-07 16:06 Matthias Pfaller
  2009-07-08  5:36 ` Eric W. Biederman
  0 siblings, 1 reply; 3+ messages in thread
From: Matthias Pfaller @ 2009-07-07 16:06 UTC (permalink / raw)
  To: linux-kernel

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.

regards, Matthias Pfaller
-- 
Matthias Pfaller                          Software Entwicklung
marco Systemanalyse und Entwicklung GmbH  Tel   +49 8131 5161 41
Hans-Böckler-Str. 2, D 85221 Dachau       Fax   +49 8131 5161 66
http://www.marco.de/                      Email leo@marco.de
Geschäftsführer Martin Reuter             HRB 171775 Amtsgericht München

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Bug in dmi_get_year (causing apic not getting enabled)
  2009-07-07 16:06 Bug in dmi_get_year (causing apic not getting enabled) Matthias Pfaller
@ 2009-07-08  5:36 ` Eric W. Biederman
  2009-07-08  6:47   ` Jiri Slaby
  0 siblings, 1 reply; 3+ messages in thread
From: Eric W. Biederman @ 2009-07-08  5:36 UTC (permalink / raw)
  To: Matthias Pfaller; +Cc: linux-kernel

Matthias Pfaller <leo@marco.de> 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....


Eric

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Bug in dmi_get_year (causing apic not getting enabled)
  2009-07-08  5:36 ` Eric W. Biederman
@ 2009-07-08  6:47   ` Jiri Slaby
  0 siblings, 0 replies; 3+ messages in thread
From: Jiri Slaby @ 2009-07-08  6:47 UTC (permalink / raw)
  To: Eric W. Biederman; +Cc: Matthias Pfaller, linux-kernel

On 07/08/2009 07:36 AM, Eric W. Biederman wrote:
> Matthias Pfaller <leo@marco.de> 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?

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-07-08  6:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-07 16:06 Bug in dmi_get_year (causing apic not getting enabled) Matthias Pfaller
2009-07-08  5:36 ` Eric W. Biederman
2009-07-08  6:47   ` Jiri Slaby

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).