]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
arch/x86/kernel/pci-calgary_64.c: change simple_strtol to simple_strtoul
authorJulia Lawall <julia@diku.dk>
Tue, 25 Nov 2008 13:13:03 +0000 (14:13 +0100)
committerIngo Molnar <mingo@elte.hu>
Tue, 25 Nov 2008 14:56:03 +0000 (15:56 +0100)
commiteff79aee91dd07e944df65fa448c8baeee7709d8
treeb1b909864df7e5ac737b685ebe016dd9c771bbe2
parent5cf02b7bafddb6c3c16ddfb23d3ce187f70528ba
arch/x86/kernel/pci-calgary_64.c: change simple_strtol to simple_strtoul

Impact: fix theoretical option string parsing overflow

Since bridge is unsigned, it would seem better to use simple_strtoul that
simple_strtol.

A simplified version of the semantic patch that makes this change is as
follows: (http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@r2@
long e;
position p;
@@

e = simple_strtol@p(...)

@@
position p != r2.p;
type T;
T e;
@@

e =
- simple_strtol@p
+ simple_strtoul
  (...)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Cc: muli@il.ibm.com
Cc: jdmason@kudzu.us
Cc: discuss@x86-64.org
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/pci-calgary_64.c