hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I9GCZS CVE: NA
-------------------------------
This reverts commit 16ccb01403953ea7e921ab1e9f9f52d3cbd5a397.
Signed-off-by: Tong Tiangen tongtiangen@huawei.com --- mm/kasan/shadow.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/mm/kasan/shadow.c b/mm/kasan/shadow.c index 9372f0c6f7ec..ffaf2df1ed6e 100644 --- a/mm/kasan/shadow.c +++ b/mm/kasan/shadow.c @@ -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 (!kasan_check_range(src, len, false, _RET_IP_) || - !kasan_check_range(dest, len, true, _RET_IP_)) - return (int)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;
return __memcpy_mcs(dest, src, len); }