|
@@ -8,6 +8,7 @@
|
|
#include <linux/module.h>
|
|
#include <linux/module.h>
|
|
|
|
|
|
#include <asm/word-at-a-time.h>
|
|
#include <asm/word-at-a-time.h>
|
|
|
|
+#include <linux/sched.h>
|
|
|
|
|
|
/*
|
|
/*
|
|
* best effort, GUP based copy_from_user() that is NMI-safe
|
|
* best effort, GUP based copy_from_user() that is NMI-safe
|
|
@@ -21,6 +22,9 @@ copy_from_user_nmi(void *to, const void __user *from, unsigned long n)
|
|
void *map;
|
|
void *map;
|
|
int ret;
|
|
int ret;
|
|
|
|
|
|
|
|
+ if (__range_not_ok(from, n, TASK_SIZE) == 0)
|
|
|
|
+ return len;
|
|
|
|
+
|
|
do {
|
|
do {
|
|
ret = __get_user_pages_fast(addr, 1, 0, &page);
|
|
ret = __get_user_pages_fast(addr, 1, 0, &page);
|
|
if (!ret)
|
|
if (!ret)
|