All of lore.kernel.org
 help / color / mirror / Atom feed
From: Coywolf Qi Hunt <coywolf@gmail.com>
To: Richard Hayden <rahaydenuk@yahoo.co.uk>
Cc: linux-kernel@vger.kernel.org
Subject: Re: A couple of OOM killer races
Date: Thu, 8 Sep 2005 10:09:05 +0800	[thread overview]
Message-ID: <2cd57c900509071909787f43f2@mail.gmail.com> (raw)
In-Reply-To: <43176820.5060609@yahoo.co.uk>

On 9/2/05, Richard Hayden <rahaydenuk@yahoo.co.uk> wrote:
> Hi all,
> 
> It appears there is no protection in badness() (called by
> out_of_memory() for each process) when it reads p->mm->total_vm. Another
> processor (or a kernel preemption) could presumably run do_exit and then
> exit_mm, freeing the process in question's reference to its mm just
> after the (!p->mm) check but before it reads p->mm->total_vm, making the
> latter reference a null pointer reference.

We have read_lock(&tasklist_lock); .

> 
> Also there appears to be no protection when we set p->time_slice in
> __oom_kill_task(). Am I right in thinking that this field should be
> protected by the appropriate runqueue lock, at least this is what
> scheduler_tick() seems to use?

ditto

-- 
Coywolf Qi Hunt
http://sosdg.org/~coywolf/

      parent reply	other threads:[~2005-09-08  2:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-01 20:44 A couple of OOM killer races Richard Hayden
2005-09-02  1:29 ` Zhou Yingchao
2005-09-08  2:09 ` Coywolf Qi Hunt [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=2cd57c900509071909787f43f2@mail.gmail.com \
    --to=coywolf@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rahaydenuk@yahoo.co.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.