]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
staging/lustre: Declare lprocfs_write_frac_u64_helper argument as __user
authorOleg Drokin <green@linuxhacker.ru>
Sun, 3 Jan 2016 17:05:45 +0000 (12:05 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Feb 2016 22:34:00 +0000 (14:34 -0800)
The buffer that lprocfs_write_frac_u64_helper is working on is
presumed to be a userspace one, so it's not suitable for use
on kernel buffers.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/include/lprocfs_status.h
drivers/staging/lustre/lustre/obdclass/lprocfs_status.c

index 0ac8e0edcc4841dd30dd3724669d1c7fe570ae0a..fb13094d8b0b2953b7dbdc7b7abbc46702dfddcc 100644 (file)
@@ -608,7 +608,7 @@ int lprocfs_write_helper(const char __user *buffer, unsigned long count,
                         int *val);
 int lprocfs_write_u64_helper(const char __user *buffer,
                             unsigned long count, __u64 *val);
-int lprocfs_write_frac_u64_helper(const char *buffer,
+int lprocfs_write_frac_u64_helper(const char __user *buffer,
                                  unsigned long count,
                                  __u64 *val, int mult);
 char *lprocfs_find_named_value(const char *buffer, const char *name,
index 51fe15f5d6870fe26987120f88f35d8477a83deb..b65ad93eca4baf0613567e6455c1cbf9b5dbafbb 100644 (file)
@@ -1319,8 +1319,8 @@ int lprocfs_write_u64_helper(const char __user *buffer, unsigned long count,
 }
 EXPORT_SYMBOL(lprocfs_write_u64_helper);
 
-int lprocfs_write_frac_u64_helper(const char *buffer, unsigned long count,
-                             __u64 *val, int mult)
+int lprocfs_write_frac_u64_helper(const char __user *buffer,
+                                 unsigned long count, __u64 *val, int mult)
 {
        char kernbuf[22], *end, *pbuf;
        __u64 whole, frac = 0, units;