Re: Rationale for RLIMIT_MEMLOCK?

From: Bodo Eggert
Date: Wed Jan 25 2006 - 19:10:40 EST


Joerg Schilling <schilling@xxxxxxxxxxxxxxxxxxx> wrote:

> I could add this piece of code to the euid == 0 part of cdrecord:
>
> LOCAL void
> raise_memlock()
> {
> #ifdef RLIMIT_MEMLOCK
> struct rlimit rlim;
>
> rlim.rlim_cur = rlim.rlim_max = RLIM_INFINITY;

I think you should rather use the size you're going to mlock, or at least
the upper bound.
--
Ich danke GMX dafür, die Verwendung meiner Adressen mittels per SPF
verbreiteten Lügen zu sabotieren.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/