]> git.pld-linux.org Git - packages/kernel.git/blob - linux-do_brk-bound-check.patch
- [2.4.2x, 2.6.x] don't recursively crash in die() on CHRP/PReP machines
[packages/kernel.git] / linux-do_brk-bound-check.patch
1 diff -urN linux-2.4.22/mm/mmap.c linux-2.4.23/mm/mmap.c
2 --- linux-2.4.22/mm/mmap.c      2003-06-13 07:51:39.000000000 -0700
3 +++ linux-2.4.23/mm/mmap.c      2003-11-28 10:26:21.000000000 -0800
4 @@ -1041,6 +1041,9 @@
5         if (!len)
6                 return addr;
7  
8 +       if ((addr + len) > TASK_SIZE || (addr + len) < addr)
9 +               return -EINVAL;
10 +
11         /*
12          * mlock MCL_FUTURE?
13          */
14
This page took 0.026518 seconds and 3 git commands to generate.