diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2009-10-06 10:34:08 +0200 |
---|---|---|
committer | Martin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com> | 2009-10-06 10:35:09 +0200 |
commit | 930e44fbeaaccb412194a2d011359714158fd9e0 (patch) | |
tree | 72dd30c98b5b4e6407cf060287e5e90e1478b44f /arch/s390 | |
parent | 22ceaf408f22680b7448f2699567ba22202e6281 (diff) | |
download | op-kernel-dev-930e44fbeaaccb412194a2d011359714158fd9e0.zip op-kernel-dev-930e44fbeaaccb412194a2d011359714158fd9e0.tar.gz |
[S390] perf_counter: fix vdso detection
s390 version of f2053f1a "powerpc/perf_counter: Fix vdso detection".
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/kernel/vdso.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/arch/s390/kernel/vdso.c b/arch/s390/kernel/vdso.c index 45a3e9a..adfb32a 100644 --- a/arch/s390/kernel/vdso.c +++ b/arch/s390/kernel/vdso.c @@ -247,6 +247,13 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp) } /* + * Put vDSO base into mm struct. We need to do this before calling + * install_special_mapping or the perf counter mmap tracking code + * will fail to recognise it as a vDSO (since arch_vma_name fails). + */ + current->mm->context.vdso_base = vdso_base; + + /* * our vma flags don't have VM_WRITE so by default, the process * isn't allowed to write those pages. * gdb can break that with ptrace interface, and thus trigger COW @@ -267,14 +274,7 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp) VM_ALWAYSDUMP, vdso_pagelist); if (rc) - goto out_up; - - /* Put vDSO base into mm struct */ - current->mm->context.vdso_base = vdso_base; - - up_write(&mm->mmap_sem); - return 0; - + current->mm->context.vdso_base = 0; out_up: up_write(&mm->mmap_sem); return rc; |