37 lines
1.3 KiB
Diff
37 lines
1.3 KiB
Diff
http://bugzilla.openvz.org/show_bug.cgi?id=1687
|
|
|
|
C/R: Use in_gate_area_no_task helper to test task's checkpoint-ability v2
|
|
|
|
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
|
|
---
|
|
arch/x86/mm/init_64.c | 1 +
|
|
kernel/cpt/cpt_process.c | 3 +--
|
|
2 files changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
Index: linux-2.6-openvz/arch/x86/mm/init_64.c
|
|
=====================================================================
|
|
--- linux-2.6-openvz.orig/arch/x86/mm/init_64.c
|
|
+++ linux-2.6-openvz/arch/x86/mm/init_64.c
|
|
@@ -893,6 +893,7 @@ int in_gate_area_no_task(unsigned long a
|
|
{
|
|
return (addr >= VSYSCALL_START) && (addr < VSYSCALL_END);
|
|
}
|
|
+EXPORT_SYMBOL(in_gate_area_no_task);
|
|
|
|
const char *arch_vma_name(struct vm_area_struct *vma)
|
|
{
|
|
Index: linux-2.6-openvz/kernel/cpt/cpt_process.c
|
|
=====================================================================
|
|
--- linux-2.6-openvz.orig/kernel/cpt/cpt_process.c
|
|
+++ linux-2.6-openvz/kernel/cpt/cpt_process.c
|
|
@@ -40,8 +40,7 @@ int check_task_state(struct task_struct
|
|
{
|
|
#ifdef CONFIG_X86_64
|
|
if (!(task_thread_info(tsk)->flags&_TIF_IA32)) {
|
|
- if (task_pt_regs(tsk)->ip >= VSYSCALL_START &&
|
|
- task_pt_regs(tsk)->ip < VSYSCALL_END) {
|
|
+ if (in_gate_area_no_task(task_pt_regs(tsk)->ip)) {
|
|
eprintk_ctx(CPT_FID "cannot be checkpointied while vsyscall, try later\n", CPT_TID(tsk));
|
|
return -EAGAIN;
|
|
}
|