Re: resource limits bug

Raymond Nijssen (raymond@woensel.ics.ele.tue.nl)
Tue, 7 Sep 1999 22:28:55 -0700 (PDT)


::: "MW" == Matthew Wilcox <Matthew.Wilcox@genedata.com> writes:

> On Sun, Sep 05, 1999 at 12:21:43PM +0100, Alan Cox wrote:
>> > BTW, why are most "unlimited" kernel limits set to 2G (that is, LONG_MAX in
>> > include/asm-*/resource.h) while 3G or so would be more correct?
>>
>> Because the ulimit values are signed. 2.2.12 has most of the checks fixed,
>> 2.3.x someone need sto shift to using an unsigned rlimit_t.

Great; thanks!

How about
#define MAX_MAP_COUNT (65536)
in sched.h ?

I don't understand why this is being checked against, and it also turns out to
be the cause of why my >2GB virtual memory process cannot grow unexpectedly.

How about getting rid of it?

> I posted that patch on Wednesday. In case you missed it I include
[...]

> diff -u linux-2.2.12/include/linux/resource.h linux-2.2.12-Wclean/include/linux/resource.h

> +typedef unsigned long rlim_t;

> struct rlimit {
> - long rlim_cur;
> - long rlim_max;
> + rlim_t rlim_cur;
> + rlim_t rlim_max;
> };

Is the above correct given that /usr/include/resourcebits.h still defines
struct rlimit { long int rlim_cur; long int rlim_max; } ?

-Raymond

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