]> git.baikalelectronics.ru Git - kernel.git/commit
brk: check the lower bound properly
authorJiri Kosina <jkosina@suse.cz>
Wed, 6 Feb 2008 21:39:44 +0000 (22:39 +0100)
committerIngo Molnar <mingo@elte.hu>
Wed, 6 Feb 2008 21:39:44 +0000 (22:39 +0100)
commitd6315d75d8f4d157fe2ffd9112a5c281a193d81f
tree9b9879d8b8cc055e4bb8eabd69b979a17e6e52cd
parent434f98741df594b12e753b3c0e418e8ffd1037b0
brk: check the lower bound properly

There is a check in sys_brk(), that tries to make sure that we do not
underflow the area that is dedicated to brk heap.

The check is however wrong, as it assumes that brk area starts immediately
after the end of the code (+bss), which is wrong for example in
environments with randomized brk start. The proper way is to check whether
the address is not below the start_brk address.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
mm/mmap.c