.. | .. |
---|
110 | 110 | #define test_thread_flag(flag) \ |
---|
111 | 111 | test_ti_thread_flag(current_thread_info(), flag) |
---|
112 | 112 | |
---|
113 | | -#ifdef CONFIG_PREEMPT_LAZY |
---|
114 | | -#define tif_need_resched() (test_thread_flag(TIF_NEED_RESCHED) || \ |
---|
115 | | - test_thread_flag(TIF_NEED_RESCHED_LAZY)) |
---|
116 | | -#define tif_need_resched_now() (test_thread_flag(TIF_NEED_RESCHED)) |
---|
117 | | -#define tif_need_resched_lazy() test_thread_flag(TIF_NEED_RESCHED_LAZY)) |
---|
118 | | - |
---|
119 | | -#else |
---|
120 | | -#define tif_need_resched() test_thread_flag(TIF_NEED_RESCHED) |
---|
121 | | -#define tif_need_resched_now() test_thread_flag(TIF_NEED_RESCHED) |
---|
122 | | -#define tif_need_resched_lazy() 0 |
---|
123 | | -#endif |
---|
| 113 | +#define tif_need_resched() test_thread_flag(TIF_NEED_RESCHED) |
---|
124 | 114 | |
---|
125 | 115 | #ifndef CONFIG_HAVE_ARCH_WITHIN_STACK_FRAMES |
---|
126 | 116 | static inline int arch_within_stack_frames(const void * const stack, |
---|
.. | .. |
---|
157 | 147 | WARN(1, "Buffer overflow detected (%d < %lu)!\n", size, count); |
---|
158 | 148 | } |
---|
159 | 149 | |
---|
160 | | -static __always_inline bool |
---|
| 150 | +static __always_inline __must_check bool |
---|
161 | 151 | check_copy_size(const void *addr, size_t bytes, bool is_source) |
---|
162 | 152 | { |
---|
163 | 153 | int sz = __compiletime_object_size(addr); |
---|
.. | .. |
---|
170 | 160 | __bad_copy_to(); |
---|
171 | 161 | return false; |
---|
172 | 162 | } |
---|
| 163 | + if (WARN_ON_ONCE(bytes > INT_MAX)) |
---|
| 164 | + return false; |
---|
173 | 165 | check_object_size(addr, bytes, is_source); |
---|
174 | 166 | return true; |
---|
175 | 167 | } |
---|