Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- blackmagic-10.8.5a4/blackmagic_lib.c.origin 2017-02-21 01:42:18.000000000 +0200
- +++ blackmagic-10.8.5a4/blackmagic_lib.c 2017-03-28 10:54:51.205782144 +0300
- @@ -662,7 +662,16 @@
- write = 0;
- down_read(¤t_task->mm->mmap_sem);
- -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
- +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
- + if (current_task == current)
- + ret = get_user_pages((unsigned long)ptr & PAGE_MASK, *nr_pages, write ? FOLL_WRITE : 0, pages, NULL);
- + else
- +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)
- + ret = get_user_pages_remote(current_task, current_task->mm, (unsigned long)ptr & PAGE_MASK, *nr_pages, write ? FOLL_WRITE : 0, pages, NULL, NULL);
- +#else
- + ret = get_user_pages_remote(current_task, current_task->mm, (unsigned long)ptr & PAGE_MASK, *nr_pages, write ? FOLL_WRITE : 0, pages, NULL);
- +#endif
- +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
- if (current_task == current)
- ret = get_user_pages((unsigned long)ptr & PAGE_MASK, *nr_pages, write, 0, pages, NULL);
- else
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement