diff options
| author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2022-05-27 16:40:01 -0700 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2022-05-27 16:40:01 -0700 |
| commit | 690e179059e7e89040d1cd564e39761567a8d5dc (patch) | |
| tree | b6a64fc5ca4fd862e17559c46676258ae17c87d5 /include/linux/thread_info.h | |
| parent | 5f76955ab1e43e5795a9631b22ca4f918a0ae986 (diff) | |
| parent | 4b0986a3613c92f4ec1bdc7f60ec66fea135991f (diff) | |
Merge tag 'v5.18' into next
Sync up with mainline to get updates to OMAP4 keypad driver and other
upstream goodies.
Diffstat (limited to 'include/linux/thread_info.h')
| -rw-r--r-- | include/linux/thread_info.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/thread_info.h b/include/linux/thread_info.h index 73a6f34b3847..9f392ec76f2b 100644 --- a/include/linux/thread_info.h +++ b/include/linux/thread_info.h @@ -209,9 +209,12 @@ __bad_copy_from(void); extern void __compiletime_error("copy destination size is too small") __bad_copy_to(void); +void __copy_overflow(int size, unsigned long count); + static inline void copy_overflow(int size, unsigned long count) { - WARN(1, "Buffer overflow detected (%d < %lu)!\n", size, count); + if (IS_ENABLED(CONFIG_BUG)) + __copy_overflow(size, count); } static __always_inline __must_check bool |
