Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8c5fb8ea authored by Akinobu Mita's avatar Akinobu Mita Committed by Linus Torvalds
Browse files

mm/debug-pagealloc.c: use memchr_inv



Use newly introduced memchr_inv() for page verification.

Signed-off-by: default avatarAkinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 79824820
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/mm.h>
#include <linux/page-debug-flags.h>
#include <linux/poison.h>
@@ -64,11 +65,8 @@ static void check_poison_mem(unsigned char *mem, size_t bytes)
	unsigned char *start;
	unsigned char *end;

	for (start = mem; start < mem + bytes; start++) {
		if (*start != PAGE_POISON)
			break;
	}
	if (start == mem + bytes)
	start = memchr_inv(mem, PAGE_POISON, bytes);
	if (!start)
		return;

	for (end = mem + bytes - 1; end > start; end--) {