public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: Rik van Riel <riel@conectiva.com.br>
Cc: Linus Torvalds <torvalds@transmeta.com>,
	"" <linux-kernel@vger.kernel.org>,
	Kingsley Cheung <kingsley@aurema.com>
Subject: Re: [TRIVIAL] Re: setrlimit incorrectly allows hard limits to exceed soft limits
Date: Mon, 09 Dec 2002 10:34:34 +1100	[thread overview]
Message-ID: <20021209042525.1CF2E2C383@lists.samba.org> (raw)
In-Reply-To: Your message of "Fri, 06 Dec 2002 11:07:00 -0200." <Pine.LNX.4.50L.0212061106050.22252-100000@duckman.distro.conectiva>

In message <Pine.LNX.4.50L.0212061106050.22252-100000@duckman.distro.conectiva>
 you write:
> On Fri, 6 Dec 2002, Rusty Trivial Russell wrote:
> 
> > > Just try "ulimit -H -m 10000" for memory limits that were not
> > > previously set.  You end up with (hard limit = 10000) < (soft limit =
> > > unlimited).
> 
> > +       if (new_rlim.rlim_cur > new_rlim.rlim_max)
> > +               return -EINVAL;
> 
> Wouldn't it be better to simply take the soft limit down
> to min(new_rlim.rlim_cur, new_rlim.rlim_max) ?

POSIX says -EINVAL, and since it's a programmer fuckup, I'd agree.

Rusty.
--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.

  parent reply	other threads:[~2002-12-09  4:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-06  3:26 [TRIVIAL] Re: setrlimit incorrectly allows hard limits to exceed soft limits Rusty Trivial Russell
2002-12-06 13:07 ` Rik van Riel
2002-12-08 23:22   ` Kingsley Cheung
2002-12-08 23:34   ` Rusty Russell [this message]
     [not found] <1054753245@toto.iv>
2002-12-09  2:47 ` Peter Chubb
2002-12-09 12:27   ` Rik van Riel
2002-12-09 19:28     ` Peter Chubb
2002-12-09 20:14       ` Rik van Riel

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=20021209042525.1CF2E2C383@lists.samba.org \
    --to=rusty@rustcorp.com.au \
    --cc=kingsley@aurema.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=riel@conectiva.com.br \
    --cc=torvalds@transmeta.com \
    /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