From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Hugh Dickins <hugh@veritas.com>
Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>,
arjan@linux.intel.com, gregkh@suse.de, jmorris@namei.org,
hooanon05@yahoo.co.jp, linux-kernel@vger.kernel.org,
linux-security-module@vger.kernel.org
Subject: Re: current->mm == NULL in security_vm_enough_memory().
Date: Tue, 14 Apr 2009 19:03:01 +0100 [thread overview]
Message-ID: <20090414190301.2c151fa2@lxorguk.ukuu.org.uk> (raw)
In-Reply-To: <Pine.LNX.4.64.0904141812390.24679@blonde.anvils>
If you want to permit a NULL vm you can use vm_enough_memory_kern() to
indicate that the caller may be a kernel thread and you are ok with that.
The case you are now hitting was considered in the original design and
provided for. The default handler traps NULL to be sure we catch cases
where nobody has considered if NULL mm is meaningful and valid (such as
old code pre the checks)
Given this case appears to be ok (if a bit novel by the kernels
standards) just flipping to use the _kern() version will do the job.
Alan
next prev parent reply other threads:[~2009-04-14 18:02 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-26 1:30 Tetsuo Handa
2009-03-26 1:41 ` James Morris
2009-03-26 4:26 ` hooanon05
2009-04-09 12:05 ` Tetsuo Handa
2009-04-10 5:14 ` hooanon05
2009-04-13 12:27 ` Tetsuo Handa
2009-04-14 16:40 ` Greg KH
2009-04-14 21:35 ` Tetsuo Handa
2009-04-14 17:45 ` Hugh Dickins
2009-04-14 18:03 ` Alan Cox [this message]
2009-04-14 18:05 ` Alan Cox
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=20090414190301.2c151fa2@lxorguk.ukuu.org.uk \
--to=alan@lxorguk.ukuu.org.uk \
--cc=arjan@linux.intel.com \
--cc=gregkh@suse.de \
--cc=hooanon05@yahoo.co.jp \
--cc=hugh@veritas.com \
--cc=jmorris@namei.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=penguin-kernel@I-love.SAKURA.ne.jp \
/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®