Commit 8bc1ad7dd301b7ca7454013519fa92e8c53655ff

Authored by Zhang Rui
Committed by Linus Torvalds
1 parent 529ba0d966

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 <rui.zhang@intel.com>
Reported-by: Leann Ogasawara <leann@ubuntu.com>
Cc: Pierre Ossman <drzeus@drzeus.cx>
Reported-by: <pablomme@googlemail.com>
Tested-by: <pablomme@googlemail.com>
Cc: <stable@kernel.org>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

... ... @@ -787,7 +787,7 @@
787 787 static struct resource reserve[MAXRESERVE];
788 788  
789 789 for (;;) {
790   - int io_start, io_num;
  790 + unsigned int io_start, io_num;
791 791 int x = reserved;
792 792  
793 793 if (get_option (&str, &io_start) != 2)