Just for good measure, make sure that check_object_size() is always inlined too, as already done for copy_*_user() and __copy_*_user().
Showing the changes to include/linux (1 of 1 file). Show all
Unified · Split
| @@ -118,8 +118,8 @@ static inline int arch_within_stack_frames(const void * const stack, · 117 unmodified lines | ||
| 118 | 118 | extern void __check_object_size(const void *ptr, unsigned long n, |
| 119 | 119 | bool to_user); |
| 120 | 120 | |
| 121 | −static inline void check_object_size(const void *ptr, unsigned long n, | |
| 122 | − bool to_user) | |
| 121 | +static __always_inline void check_object_size(const void *ptr, unsigned long n, | |
| 122 | + bool to_user) | |
| 123 | 123 | { |
| 124 | 124 | if (!__builtin_constant_p(n)) |
| 125 | 125 | __check_object_size(ptr, n, to_user); |