Suspicious RLIM_INFINITY use, 2.4.17

From: Richard Zidlicky (Richard.Zidlicky@stud.informatik.uni-erlangen.de)
Date: Tue Feb 05 2002 - 15:17:40 EST


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/



This archive was generated by hypermail 2b29 : Thu Feb 07 2002 - 21:00:44 EST