aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/vdso/vma.c
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2009-06-05 14:04:51 +0200
committerIngo Molnar <mingo@elte.hu>2009-06-05 14:46:40 +0200
commitf7b6eb3fa07269da20dbbde8ba37a0273fdbd9c9 (patch)
tree4816daabf4b89ea8497a2b045da7670b70e96c58 /arch/x86/vdso/vma.c
parentcf1f45744c6fa3501e0a6f0ddc418f0ef27e725b (diff)
downloadkernel_samsung_crespo-f7b6eb3fa07269da20dbbde8ba37a0273fdbd9c9.zip
kernel_samsung_crespo-f7b6eb3fa07269da20dbbde8ba37a0273fdbd9c9.tar.gz
kernel_samsung_crespo-f7b6eb3fa07269da20dbbde8ba37a0273fdbd9c9.tar.bz2
x86: Set context.vdso before installing the mapping
In order to make arch_vma_name() work from inside install_special_mapping() we need to set the context.vdso before calling it. ( This is needed for performance counters to be able to track this special executable area. ) Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> LKML-Reference: <new-submission> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/vdso/vma.c')
-rw-r--r--arch/x86/vdso/vma.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/x86/vdso/vma.c b/arch/x86/vdso/vma.c
index 7133cdf..93b7a29 100644
--- a/arch/x86/vdso/vma.c
+++ b/arch/x86/vdso/vma.c
@@ -115,15 +115,18 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
goto up_fail;
}
+ current->mm->context.vdso = (void *)addr;
+
ret = install_special_mapping(mm, addr, vdso_size,
VM_READ|VM_EXEC|
VM_MAYREAD|VM_MAYWRITE|VM_MAYEXEC|
VM_ALWAYSDUMP,
vdso_pages);
- if (ret)
+ if (ret) {
+ current->mm->context.vdso = NULL;
goto up_fail;
+ }
- current->mm->context.vdso = (void *)addr;
up_fail:
up_write(&mm->mmap_sem);
return ret;