[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>
This commit is contained in:
committed by
Martin Schwidefsky
parent
22ceaf408f
commit
930e44fbea
@@ -246,6 +246,13 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
|
|||||||
goto out_up;
|
goto out_up;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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
|
* our vma flags don't have VM_WRITE so by default, the process
|
||||||
* isn't allowed to write those pages.
|
* isn't allowed to write those pages.
|
||||||
@@ -267,14 +274,7 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
|
|||||||
VM_ALWAYSDUMP,
|
VM_ALWAYSDUMP,
|
||||||
vdso_pagelist);
|
vdso_pagelist);
|
||||||
if (rc)
|
if (rc)
|
||||||
goto out_up;
|
current->mm->context.vdso_base = 0;
|
||||||
|
|
||||||
/* Put vDSO base into mm struct */
|
|
||||||
current->mm->context.vdso_base = vdso_base;
|
|
||||||
|
|
||||||
up_write(&mm->mmap_sem);
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
out_up:
|
out_up:
|
||||||
up_write(&mm->mmap_sem);
|
up_write(&mm->mmap_sem);
|
||||||
return rc;
|
return rc;
|
||||||
|
Reference in New Issue
Block a user