lkml.org 
[lkml]   [2002]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectSuspicious RLIM_INFINITY use, 2.4.17
Hi,

I came acros this (2.4.17):

fs/binfmt_aout.c:

rlim = current->rlim[RLIMIT_DATA].rlim_cur;
if (rlim >= RLIM_INFINITY)
rlim = ~0;
if (ex.a_data + ex.a_bss > rlim)
return -ENOMEM;

this looks like it will disable any limit checks, but no similar
code is binfmt_elf so maybe it should be removed altogether?


--- mm/mmap.c.rz Sat Dec 29 01:02:57 2001
+++ mm/mmap.c Tue Feb 5 19:53:59 2002
@@ -167,7 +167,7 @@

/* Check against rlimit.. */
rlim = current->rlim[RLIMIT_DATA].rlim_cur;
- if (rlim < RLIM_INFINITY && brk - mm->start_data > rlim)
+ if (rlim != RLIM_INFINITY && brk - mm->start_data > rlim)
goto out;

/* Check against existing mmap mappings. */

Richard
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:24    [W:0.082 / U:1.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site