Messages in this thread |  | | | Date | Tue, 14 Apr 2009 19:03:01 +0100 | | From | Alan Cox <> | | 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
|  |