- addr = get_unmapped_area_prot(NULL, addr, len, 0,
- flags, PROT_READ | PROT_EXEC);
- if (unlikely(addr & ~PAGE_MASK)) {
- up_write(¤t->mm->mmap_sem);
- return addr;
- }
- err = install_special_mapping(current->mm, addr, len,
- VM_DONTEXPAND | VM_READ | VM_EXEC |
- VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC,
- PAGE_READONLY_EXEC,
- sysenter_pages);
- if (likely(err == 0)) {
- current->mm->context.vdso = (void *)addr;
- ti->sysenter_return = &SYSENTER_RETURN_OFFSET + addr;
- }
- up_write(¤t->mm->mmap_sem);
- return err;
+
+ current->mm->context.vdso = (void *)addr;
+ current_thread_info()->sysenter_return =
+ (void *)VDSO_SYM(&SYSENTER_RETURN);
+ vx_vmpages_inc(mm);
+up_fail:
+ up_write(&mm->mmap_sem);
+ return ret;