aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/s390/kernel/vdso.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/arch/s390/kernel/vdso.c b/arch/s390/kernel/vdso.c
index 45a3e9a7ae21..adfb32aa6d59 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)
247 } 247 }
248 248
249 /* 249 /*
250 * Put vDSO base into mm struct. We need to do this before calling
251 * install_special_mapping or the perf counter mmap tracking code
252 * will fail to recognise it as a vDSO (since arch_vma_name fails).
253 */
254 current->mm->context.vdso_base = vdso_base;
255
256 /*
250 * our vma flags don't have VM_WRITE so by default, the process 257 * our vma flags don't have VM_WRITE so by default, the process
251 * isn't allowed to write those pages. 258 * isn't allowed to write those pages.
252 * gdb can break that with ptrace interface, and thus trigger COW 259 * 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)
267 VM_ALWAYSDUMP, 274 VM_ALWAYSDUMP,
268 vdso_pagelist); 275 vdso_pagelist);
269 if (rc) 276 if (rc)
270 goto out_up; 277 current->mm->context.vdso_base = 0;
271
272 /* Put vDSO base into mm struct */
273 current->mm->context.vdso_base = vdso_base;
274
275 up_write(&mm->mmap_sem);
276 return 0;
277
278out_up: 278out_up:
279 up_write(&mm->mmap_sem); 279 up_write(&mm->mmap_sem);
280 return rc; 280 return rc;