Advertisement
Guest User

Untitled

a guest
Mar 28th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. --- blackmagic-10.8.5a4/blackmagic_lib.c.origin 2017-02-21 01:42:18.000000000 +0200
  2. +++ blackmagic-10.8.5a4/blackmagic_lib.c 2017-03-28 10:54:51.205782144 +0300
  3. @@ -662,7 +662,16 @@
  4. write = 0;
  5.  
  6. down_read(&current_task->mm->mmap_sem);
  7. -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
  8. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
  9. + if (current_task == current)
  10. + ret = get_user_pages((unsigned long)ptr & PAGE_MASK, *nr_pages, write ? FOLL_WRITE : 0, pages, NULL);
  11. + else
  12. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)
  13. + ret = get_user_pages_remote(current_task, current_task->mm, (unsigned long)ptr & PAGE_MASK, *nr_pages, write ? FOLL_WRITE : 0, pages, NULL, NULL);
  14. +#else
  15. + ret = get_user_pages_remote(current_task, current_task->mm, (unsigned long)ptr & PAGE_MASK, *nr_pages, write ? FOLL_WRITE : 0, pages, NULL);
  16. +#endif
  17. +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
  18. if (current_task == current)
  19. ret = get_user_pages((unsigned long)ptr & PAGE_MASK, *nr_pages, write, 0, pages, NULL);
  20. else
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement