Commit 16ccb014 authored by Tong Tiangen's avatar Tong Tiangen
Browse files

kasan: fix the compilation error for memcpy_mcs()

hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8MWHA


CVE: NA

--------------------------------

check_memory_region() has been renamed kasan_check_range() in commit
f00748bf ("kasan: prefix global functions with kasan_"). Therefore,
a compilation error occurs when check_memory_region() is called in
memcpy_mcs() in file mm/kasan/shadow.c, this patch fix this issue.

Fixes: 23ca830ebbef ("arm64: introduce copy_mc_to_kernel() implementation")
Signed-off-by: default avatarTong Tiangen <tongtiangen@huawei.com>
parent cb2566ed
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -83,9 +83,9 @@ void *memcpy(void *dest, const void *src, size_t len)
#undef memcpy_mcs
int memcpy_mcs(void *dest, const void *src, size_t len)
{
	if (!check_memory_region((unsigned long)src, len, false, _RET_IP_) ||
	    !check_memory_region((unsigned long)dest, len, true, _RET_IP_))
		return (unsigned long)len;
	if (!kasan_check_range(src, len, false, _RET_IP_) ||
	    !kasan_check_range(dest, len, true, _RET_IP_))
		return (int)len;

	return __memcpy_mcs(dest, src, len);
}