From 01573e231f18eb2d99162747186f59511f56b64d Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Fri, 08 Dec 2023 10:40:48 +0000 Subject: [PATCH] 移去rt --- kernel/include/linux/thread_info.h | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/kernel/include/linux/thread_info.h b/kernel/include/linux/thread_info.h index 57a3d99..3cb02ce 100644 --- a/kernel/include/linux/thread_info.h +++ b/kernel/include/linux/thread_info.h @@ -157,7 +157,7 @@ WARN(1, "Buffer overflow detected (%d < %lu)!\n", size, count); } -static __always_inline bool +static __always_inline __must_check bool check_copy_size(const void *addr, size_t bytes, bool is_source) { int sz = __compiletime_object_size(addr); @@ -170,6 +170,8 @@ __bad_copy_to(); return false; } + if (WARN_ON_ONCE(bytes > INT_MAX)) + return false; check_object_size(addr, bytes, is_source); return true; } -- Gitblit v1.6.2