diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/mmap.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -251,7 +251,8 @@ asmlinkage unsigned long sys_brk(unsigned long brk) | |||
251 | * not page aligned -Ram Gupta | 251 | * not page aligned -Ram Gupta |
252 | */ | 252 | */ |
253 | rlim = current->signal->rlim[RLIMIT_DATA].rlim_cur; | 253 | rlim = current->signal->rlim[RLIMIT_DATA].rlim_cur; |
254 | if (rlim < RLIM_INFINITY && brk - mm->start_data > rlim) | 254 | if (rlim < RLIM_INFINITY && (brk - mm->start_brk) + |
255 | (mm->end_data - mm->start_data) > rlim) | ||
255 | goto out; | 256 | goto out; |
256 | 257 | ||
257 | newbrk = PAGE_ALIGN(brk); | 258 | newbrk = PAGE_ALIGN(brk); |