Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 166203
b: refs/heads/master
c: f2053f1
h: refs/heads/master
i:
  166201: 144799d
  166199: 351bb6b
v: v3
  • Loading branch information
Anton Blanchard authored and Benjamin Herrenschmidt committed Sep 24, 2009
1 parent ea2c006 commit a81afe6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8bbde7a7062facf8af35bcc9a64cbafe8f36f3cf
refs/heads/master: f2053f1a7bf6005b4e81826b1ac8d0b4117c4cf0
14 changes: 10 additions & 4 deletions trunk/arch/powerpc/kernel/vdso.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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;
Expand Down

0 comments on commit a81afe6

Please sign in to comment.