lkml.org 
[lkml]   [2018]   [Jul]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] x86/vdso: Change return type to vm_fault_t for fault handlers
On Mon, Jun 25, 2018 at 11:27:37PM +0530, Souptick Joarder wrote:
> Use new return type vm_fault_t for both fault handler
> vdso_fault() and vvar_fault(). Previously vm_insert_pfn()
> returns err which has to mapped into VM_FAULT_* type.
> The new function vmf_insert_pfn() will replace this
> inefficiency by returning correct VM_FAULT_* type.

> @@ -105,10 +105,10 @@ static int vvar_fault(const struct vm_special_mapping *sm,
> * the page past the end of the vvar mapping.
> */
> if (sym_offset == 0)
> - return VM_FAULT_SIGBUS;
> + return ret;
>
> if (sym_offset == image->sym_vvar_page) {
> - ret = vm_insert_pfn(vma, vmf->address,
> + ret = vmf_insert_pfn(vma, vmf->address,
> __pa_symbol(&__vvar_page) >> PAGE_SHIFT);
> } else if (sym_offset == image->sym_pvclock_page) {
> struct pvclock_vsyscall_time_info *pvti =
> @@ -124,14 +124,11 @@ static int vvar_fault(const struct vm_special_mapping *sm,

Haven't you missed converting vm_insert_pfn_prot() at line 117?
Did you test-compile this?

\
 
 \ /
  Last update: 2018-07-03 13:18    [W:0.068 / U:0.744 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site