All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Hayden <rahaydenuk@yahoo.co.uk>
To: linux-kernel@vger.kernel.org
Cc: coywolf@gmail.com
Subject: A couple of OOM killer races
Date: Thu, 01 Sep 2005 21:44:16 +0100	[thread overview]
Message-ID: <43176820.5060609@yahoo.co.uk> (raw)

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.

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?

Have I missed anything?

Best regards,

Richard Hayden.

		
___________________________________________________________ 
How much free photo storage do you get? Store your holiday 
snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com

             reply	other threads:[~2005-09-01 20:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-01 20:44 Richard Hayden [this message]
2005-09-02  1:29 ` A couple of OOM killer races Zhou Yingchao
2005-09-08  2:09 ` Coywolf Qi Hunt

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=43176820.5060609@yahoo.co.uk \
    --to=rahaydenuk@yahoo.co.uk \
    --cc=coywolf@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /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.