public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Richard Zidlicky  <Richard.Zidlicky@stud.informatik.uni-erlangen.de>
To: Linux Kernel ML <linux-kernel@vger.kernel.org>
Subject: Suspicious RLIM_INFINITY use, 2.4.17
Date: Tue, 5 Feb 2002 21:17:40 +0100	[thread overview]
Message-ID: <20020205211740.A278@linux-m68k.org> (raw)

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

                 reply	other threads:[~2002-02-05 21:15 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020205211740.A278@linux-m68k.org \
    --to=richard.zidlicky@stud.informatik.uni-erlangen.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox