[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090414190301.2c151fa2@lxorguk.ukuu.org.uk>
Date: Tue, 14 Apr 2009 19:03:01 +0100
From: Alan Cox <alan@...rguk.ukuu.org.uk>
To: Hugh Dickins <hugh@...itas.com>
Cc: Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>,
arjan@...ux.intel.com, gregkh@...e.de, jmorris@...ei.org,
hooanon05@...oo.co.jp, linux-kernel@...r.kernel.org,
linux-security-module@...r.kernel.org
Subject: Re: current->mm == NULL in security_vm_enough_memory().
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists