From: Anil Belur Date: Thu, 31 Jul 2014 06:07:05 +0000 (+0530) Subject: staging: lustre: ldlm: ldlm_resource.c - fix dereferenceing user space buffer X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f1555465d3f7c0cb98343282d51d216c90cb8e2c;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git 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] *from ./lustre/ldlm/ldlm_resource.c:202:35: got char const *buffer Signed-off-by: Anil Belur Signed-off-by: Greg Kroah-Hartman --- 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];