]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - lib/strncpy_from_user.c
Merge branches 'intel_pstate-fix' and 'cpufreq-x86-fix'
[mirror_ubuntu-artful-kernel.git] / lib / strncpy_from_user.c
index 9c5fe81104135364bca9f2b0da47f4e2a1ed51fc..7e35fc450c5bb780121cf3e6df0a87abaa740f5b 100644 (file)
@@ -1,6 +1,7 @@
 #include <linux/compiler.h>
 #include <linux/export.h>
 #include <linux/kasan-checks.h>
+#include <linux/thread_info.h>
 #include <linux/uaccess.h>
 #include <linux/kernel.h>
 #include <linux/errno.h>
@@ -111,6 +112,7 @@ long strncpy_from_user(char *dst, const char __user *src, long count)
                long retval;
 
                kasan_check_write(dst, count);
+               check_object_size(dst, count, false);
                user_access_begin();
                retval = do_strncpy_from_user(dst, src, count, max);
                user_access_end();