Commit cadffe60 authored by Oleg Drokin's avatar Oleg Drokin Committed by Greg Kroah-Hartman

staging/lustre: Declare lprocfs_write_frac_u64_helper argument as __user

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: default avatarOleg Drokin <green@linuxhacker.ru>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f2938c04
...@@ -608,7 +608,7 @@ int lprocfs_write_helper(const char __user *buffer, unsigned long count, ...@@ -608,7 +608,7 @@ int lprocfs_write_helper(const char __user *buffer, unsigned long count,
int *val); int *val);
int lprocfs_write_u64_helper(const char __user *buffer, int lprocfs_write_u64_helper(const char __user *buffer,
unsigned long count, __u64 *val); 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, unsigned long count,
__u64 *val, int mult); __u64 *val, int mult);
char *lprocfs_find_named_value(const char *buffer, const char *name, char *lprocfs_find_named_value(const char *buffer, const char *name,
......
...@@ -1319,8 +1319,8 @@ int lprocfs_write_u64_helper(const char __user *buffer, unsigned long count, ...@@ -1319,8 +1319,8 @@ int lprocfs_write_u64_helper(const char __user *buffer, unsigned long count,
} }
EXPORT_SYMBOL(lprocfs_write_u64_helper); EXPORT_SYMBOL(lprocfs_write_u64_helper);
int lprocfs_write_frac_u64_helper(const char *buffer, unsigned long count, int lprocfs_write_frac_u64_helper(const char __user *buffer,
__u64 *val, int mult) unsigned long count, __u64 *val, int mult)
{ {
char kernbuf[22], *end, *pbuf; char kernbuf[22], *end, *pbuf;
__u64 whole, frac = 0, units; __u64 whole, frac = 0, units;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment