diff options
| author | Zhang Yanfei <[email protected]> | 2013-07-08 16:00:19 -0700 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2013-07-09 10:33:23 -0700 |
| commit | bcb615a81b1765864c71c50afb56631e7a1e5283 (patch) | |
| tree | 216f4970befea4f21394fc76e9b55cf15424c678 /tools/perf/scripts/python/bin | |
| parent | 64363aad5ff1b878230e91223038c26a2205bff3 (diff) | |
mm/vmalloc.c: fix an overflow bug in alloc_vmap_area()
When searching a vmap area in the vmalloc space, we use (addr + size -
1) to check if the value is less than addr, which is an overflow. But
we assign (addr + size) to vmap_area->va_end.
So if we come across the below case:
(addr + size - 1) : not overflow
(addr + size) : overflow
we will assign an overflow value (e.g 0) to vmap_area->va_end, And this
will trigger BUG in __insert_vmap_area, causing system panic.
So using (addr + size) to check the overflow should be the correct
behaviour, not (addr + size - 1).
Signed-off-by: Zhang Yanfei <[email protected]>
Reported-by: Ghennadi Procopciuc <[email protected]>
Tested-by: Daniel Baluta <[email protected]>
Cc: David Rientjes <[email protected]>
Cc: Minchan Kim <[email protected]>
Cc: KOSAKI Motohiro <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions