lkml.org 
[lkml]   [2002]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [TRIVIAL] Re: setrlimit incorrectly allows hard limits to exceed soft limits
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) ?

regards,

Rik
--
A: No.
Q: Should I include quotations after my reply?
http://www.surriel.com/ http://guru.conectiva.com/
-
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:31    [W:0.249 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site