summaryrefslogtreecommitdiffstats
path: root/mm/debug-pagealloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/debug-pagealloc.c')
-rw-r--r--mm/debug-pagealloc.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/mm/debug-pagealloc.c b/mm/debug-pagealloc.c
index a4b6d707a31f..2618933efdb3 100644
--- a/mm/debug-pagealloc.c
+++ b/mm/debug-pagealloc.c
@@ -1,4 +1,5 @@
1#include <linux/kernel.h> 1#include <linux/kernel.h>
2#include <linux/string.h>
2#include <linux/mm.h> 3#include <linux/mm.h>
3#include <linux/page-debug-flags.h> 4#include <linux/page-debug-flags.h>
4#include <linux/poison.h> 5#include <linux/poison.h>
@@ -64,11 +65,8 @@ static void check_poison_mem(unsigned char *mem, size_t bytes)
64 unsigned char *start; 65 unsigned char *start;
65 unsigned char *end; 66 unsigned char *end;
66 67
67 for (start = mem; start < mem + bytes; start++) { 68 start = memchr_inv(mem, PAGE_POISON, bytes);
68 if (*start != PAGE_POISON) 69 if (!start)
69 break;
70 }
71 if (start == mem + bytes)
72 return; 70 return;
73 71
74 for (end = mem + bytes - 1; end > start; end--) { 72 for (end = mem + bytes - 1; end > start; end--) {