The commit is pushed to "branch-rh7-3.10.0-123.1.2-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git after rh7-3.10.0-123.1.2.vz7.4.10 ------> commit a68f7bbb30ef8ae0adcbd5f772989ae37fac6941 Author: Kir Kolyshkin <k...@openvz.org> Date: Thu May 7 20:28:09 2015 +0400
ve/kernel: fix kernel_thread() compilation for !CONFIG_VE This was found while tring to compile the kernel with a stock config (i.e. no CONFIG_BEANCOUNTERS, CONFIG_VE etc.) and boot it on IBM Power8. ============================================================= This is a fix to commit 0800da0. Variable ve_allow_kthreads is defined in kernel/ve/ve.c which is only included if CONFIG_VE is set, otherwise we get this: kernel/fork.c: In function âkernel_threadâ: kernel/fork.c:1723:7: error: âve_allow_kthreadsâ undeclared (first use in this function) if (!ve_allow_kthreads && !ve_is_super(get_exec_env())) { Signed-off-by: Kir Kolyshkin <k...@openvz.org> --- kernel/fork.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/fork.c b/kernel/fork.c index 5c857bc..95950e7 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -1719,12 +1719,14 @@ long do_fork(unsigned long clone_flags, */ pid_t kernel_thread(int (*fn)(void *), void *arg, unsigned long flags) { +#ifdef CONFIG_VE /* Don't allow kernel_thread() inside VE */ if (!ve_allow_kthreads && !ve_is_super(get_exec_env())) { printk("kernel_thread call inside container\n"); dump_stack(); return -EPERM; } +#endif return do_fork(flags|CLONE_VM|CLONE_UNTRACED, (unsigned long)fn, (unsigned long)arg, NULL, NULL);
_______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel