diff options
Diffstat (limited to 'lib/strncpy_from_user.c')
-rw-r--r-- | lib/strncpy_from_user.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/strncpy_from_user.c b/lib/strncpy_from_user.c index 9c5fe8110413..7e35fc450c5b 100644 --- a/lib/strncpy_from_user.c +++ b/lib/strncpy_from_user.c | |||
@@ -1,6 +1,7 @@ | |||
1 | #include <linux/compiler.h> | 1 | #include <linux/compiler.h> |
2 | #include <linux/export.h> | 2 | #include <linux/export.h> |
3 | #include <linux/kasan-checks.h> | 3 | #include <linux/kasan-checks.h> |
4 | #include <linux/thread_info.h> | ||
4 | #include <linux/uaccess.h> | 5 | #include <linux/uaccess.h> |
5 | #include <linux/kernel.h> | 6 | #include <linux/kernel.h> |
6 | #include <linux/errno.h> | 7 | #include <linux/errno.h> |
@@ -111,6 +112,7 @@ long strncpy_from_user(char *dst, const char __user *src, long count) | |||
111 | long retval; | 112 | long retval; |
112 | 113 | ||
113 | kasan_check_write(dst, count); | 114 | kasan_check_write(dst, count); |
115 | check_object_size(dst, count, false); | ||
114 | user_access_begin(); | 116 | user_access_begin(); |
115 | retval = do_strncpy_from_user(dst, src, count, max); | 117 | retval = do_strncpy_from_user(dst, src, count, max); |
116 | user_access_end(); | 118 | user_access_end(); |