summaryrefslogtreecommitdiffstats
path: root/kernel/power/snapshot.c
diff options
context:
space:
mode:
authorJoonyoung Shim <jy0922.shim@samsung.com>2013-09-11 14:21:43 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2013-09-11 15:57:35 -0700
commit674470d97958a0ec72f72caf7f6451da40159cc7 (patch)
tree5085abf683ef3ac3f2dcf745b0d214dc70031582 /kernel/power/snapshot.c
parenteee87e1726af8c746f0e15ae6c57a97675f5e960 (diff)
downloadlinux-674470d97958a0ec72f72caf7f6451da40159cc7.tar.bz2
lib/genalloc.c: fix overflow of ending address of memory chunk
In struct gen_pool_chunk, end_addr means the end address of memory chunk (inclusive), but in the implementation it is treated as address + size of memory chunk (exclusive), so it points to the address plus one instead of correct ending address. The ending address of memory chunk plus one will cause overflow on the memory chunk including the last address of memory map, e.g. when starting address is 0xFFF00000 and size is 0x100000 on 32bit machine, ending address will be 0x100000000. Use correct ending address like starting address + size - 1. [akpm@linux-foundation.org: add comment to struct gen_pool_chunk:end_addr] Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/power/snapshot.c')
0 files changed, 0 insertions, 0 deletions