diff options
| author | Zhang Rui <[email protected]> | 2009-06-30 11:41:31 -0700 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2009-06-30 18:56:00 -0700 |
| commit | 8bc1ad7dd301b7ca7454013519fa92e8c53655ff (patch) | |
| tree | 602ec95fa99b0256370f3d887953cb30e159cc25 | |
| parent | 529ba0d9669386157457a1cb96294d2fe79b3f88 (diff) | |
kernel/resource.c: fix sign extension in reserve_setup()
When the 32-bit signed quantities get assigned to the u64 resource_size_t,
they are incorrectly sign-extended.
Addresses http://bugzilla.kernel.org/show_bug.cgi?id=13253
Addresses http://bugzilla.kernel.org/show_bug.cgi?id=9905
Signed-off-by: Zhang Rui <[email protected]>
Reported-by: Leann Ogasawara <[email protected]>
Cc: Pierre Ossman <[email protected]>
Reported-by: <[email protected]>
Tested-by: <[email protected]>
Cc: <[email protected]>
Cc: Jesse Barnes <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
| -rw-r--r-- | kernel/resource.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/resource.c b/kernel/resource.c index ac5f3a36923f..78b087221c15 100644 --- a/kernel/resource.c +++ b/kernel/resource.c @@ -787,7 +787,7 @@ static int __init reserve_setup(char *str) static struct resource reserve[MAXRESERVE]; for (;;) { - int io_start, io_num; + unsigned int io_start, io_num; int x = reserved; if (get_option (&str, &io_start) != 2) |