From a81afe6f0048e7940dc895a63057d23ee0b8fb99 Mon Sep 17 00:00:00 2001 From: Anton Blanchard Date: Mon, 21 Sep 2009 16:57:40 +0000 Subject: [PATCH] --- yaml --- r: 166203 b: refs/heads/master c: f2053f1a7bf6005b4e81826b1ac8d0b4117c4cf0 h: refs/heads/master i: 166201: 144799dc58b59f182b77268ed37b6d4913cb2821 166199: 351bb6b721cf18afd3d0a6563210cc54867dcb6a v: v3 --- [refs] | 2 +- trunk/arch/powerpc/kernel/vdso.c | 14 ++++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 73996c89ec81..f7746df8fb5a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 8bbde7a7062facf8af35bcc9a64cbafe8f36f3cf +refs/heads/master: f2053f1a7bf6005b4e81826b1ac8d0b4117c4cf0 diff --git a/trunk/arch/powerpc/kernel/vdso.c b/trunk/arch/powerpc/kernel/vdso.c index 3faaf29bdb29..94e2df3cae07 100644 --- a/trunk/arch/powerpc/kernel/vdso.c +++ b/trunk/arch/powerpc/kernel/vdso.c @@ -240,6 +240,13 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp) goto fail_mmapsem; } + /* + * 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. @@ -260,11 +267,10 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp) VM_MAYREAD|VM_MAYWRITE|VM_MAYEXEC| VM_ALWAYSDUMP, vdso_pagelist); - if (rc) + if (rc) { + current->mm->context.vdso_base = 0; goto fail_mmapsem; - - /* Put vDSO base into mm struct */ - current->mm->context.vdso_base = vdso_base; + } up_write(&mm->mmap_sem); return 0;