mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
Cc: manfred@colorfullife.com, drepper@redhat.com,
	linux-kernel@vger.kernel.org
Subject: Re: message queue limits
Date: Fri, 16 Apr 2004 14:35:38 -0700	[thread overview]
Message-ID: <20040416143538.04b4cd13.akpm@osdl.org> (raw)
In-Reply-To: <20040416140613.GA2253@logos.cnet>

Marcelo Tosatti <marcelo.tosatti@cyclades.com> wrote:
>
> This should be working, but for some reason rlim[RLIMIT_MSGQUEUE].rlim_cur of
> all tasks is 0, remembering it sets init_tasks's value at ipc/mqueue.c's __init function:
> 
> 	init_task.rlim[RLIMIT_MSGQUEUE].rlim_cur = 64;
> 	init_task.rlim[RLIMIT_MSGQUEUE].rlim_max = 64;

init_task is the task_struct for process 0, "swapper".  But by the time we
run the initcalls, process 1 ("init") is up and running.

So by the time you execute these assignments, you're changing the limits on
a process which will never again create any children.

It's a bit hacky, but you could do

	BUG_ON(current->pid != 1);
	current->rlim[RLIMIT_MSGQUEUE].rlim_cur = 64;

but longer-term these initialisations should be moved into
include/asm-foo/reousrce.h:INIT_RLIMITS

      reply	other threads:[~2004-04-16 21:37 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-12  5:48 Ulrich Drepper
2004-04-13 20:16 ` Bill Davidsen
2004-04-15 14:53 ` Marcelo Tosatti
2004-04-15 19:24   ` Andrew Morton
2004-04-15 19:54     ` Marcelo Tosatti
2004-04-15 21:46       ` Marcelo Tosatti
2004-04-15 22:54         ` Andrew Morton
2004-04-16  0:10           ` Marcelo Tosatti
2004-04-16  1:48             ` Andrew Morton
2004-04-16 13:13               ` Marcelo Tosatti
     [not found] ` <20040415141846.GE2085@logos.cnet>
     [not found]   ` <407EB08D.4010607@colorfullife.com>
2004-04-16 14:06     ` Marcelo Tosatti
2004-04-16 21:35       ` Andrew Morton [this message]

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=20040416143538.04b4cd13.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=drepper@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manfred@colorfullife.com \
    --cc=marcelo.tosatti@cyclades.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

all inboxes | Powered by JetHome®