Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 605144 | Differences between
and this patch

Collapse All | Expand All

(-)work.old/vmmon-only/linux/hostif.c (+4 lines)
Lines 1162-1173 Link Here
1162
   int retval;
1162
   int retval;
1163
1163
1164
   down_read(&current->mm->mmap_sem);
1164
   down_read(&current->mm->mmap_sem);
1165
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
1166
   retval = get_user_pages((unsigned long)uvAddr, numPages, 0, ppages, NULL);
1167
#else
1165
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
1168
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
1166
   retval = get_user_pages((unsigned long)uvAddr, numPages, 0, 0, ppages, NULL);
1169
   retval = get_user_pages((unsigned long)uvAddr, numPages, 0, 0, ppages, NULL);
1167
#else
1170
#else
1168
   retval = get_user_pages(current, current->mm, (unsigned long)uvAddr,
1171
   retval = get_user_pages(current, current->mm, (unsigned long)uvAddr,
1169
                           numPages, 0, 0, ppages, NULL);
1172
                           numPages, 0, 0, ppages, NULL);
1170
#endif
1173
#endif
1174
#endif
1171
   up_read(&current->mm->mmap_sem);
1175
   up_read(&current->mm->mmap_sem);
1172
1176
1173
   return retval != numPages;
1177
   return retval != numPages;

Return to bug 605144