summaryrefslogtreecommitdiff
path: root/drivers/staging
diff options
context:
space:
mode:
authorAnil Belur <askb23@gmail.com>2014-07-31 11:37:05 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-08-01 14:40:30 -0700
commitf1555465d3f7c0cb98343282d51d216c90cb8e2c (patch)
tree572dcaf449be8019b1821e1eebd1f9578ebe1533 /drivers/staging
parent80039faa8809461f8e23892e14277f9f0af45505 (diff)
staging: lustre: ldlm: ldlm_resource.c - fix dereferenceing user space buffer
- this fixes sparse warning for directly deferencing user space buffer ./lustre/ldlm/ldlm_resource.c:202:35: warning: incorrect type in argument 2 (different address spaces) ./lustre/ldlm/ldlm_resource.c:202:35: expected void const [noderef] <asn:1>*from ./lustre/ldlm/ldlm_resource.c:202:35: got char const *buffer Signed-off-by: Anil Belur <askb23@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/lustre/lustre/ldlm/ldlm_resource.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c
index 91d028b28c2c..efd45e513416 100644
--- a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c
+++ b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c
@@ -189,8 +189,9 @@ static int lprocfs_lru_size_seq_show(struct seq_file *m, void *v)
return lprocfs_rd_uint(m, nr);
}
-static ssize_t lprocfs_lru_size_seq_write(struct file *file, const char *buffer,
- size_t count, loff_t *off)
+static ssize_t lprocfs_lru_size_seq_write(struct file *file,
+ const char __user *buffer,
+ size_t count, loff_t *off)
{
struct ldlm_namespace *ns = ((struct seq_file *)file->private_data)->private;
char dummy[MAX_STRING_SIZE + 1];