All of lore.kernel.org
 help / color / mirror / Atom feed
From: hooanon05@yahoo.co.jp
To: linux-kernel@vger.kernel.org
Subject: __vm_enough_memory(), OVERCOMMIT_NEVER, current->mm, kernel thread
Date: Wed, 22 Oct 2008 00:14:31 +0900	[thread overview]
Message-ID: <7123.1224602071@jrobl> (raw)


Hello all,

When sysctl_overcommit_memory is set OVERCOMMIT_NEVER,
__vm_enough_memory() refers current->mm.

For example,
# exportfs -i -o ... localhost:/tmpfs
# mkdir /tmp/w
# mount -o ... localhost:/tmpfs /tmp/w
# yes > /tmp/w/fileA

In this case, NFSD (kernel thread) calls shmem_file_write() or
shmem_write_begin() and __vm_enough_memory() is called. But current->mm
is NULL and the kernel crashes.
If a user have to set OVERCOMMIT_NEVER, where should we fix?


Junjiro R. Okajima

             reply	other threads:[~2008-10-21 15:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-21 15:14 hooanon05 [this message]
2008-10-21 15:46 ` __vm_enough_memory(), OVERCOMMIT_NEVER, current->mm, kernel thread Alan Cox
2008-10-21 23:10   ` hooanon05
2008-10-22  5:35     ` hooanon05
2008-10-22  8:27     ` Alan Cox
2008-10-22 11:26       ` hooanon05
2008-10-22 12:09         ` Alan Cox
2008-10-22 12:46           ` hooanon05
2008-10-22 13:37           ` James Morris

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=7123.1224602071@jrobl \
    --to=hooanon05@yahoo.co.jp \
    --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.