* [PATCH] staging: lustre: ldlm: ldlm_resource.c - fix dereferenceing user space buffer
@ 2014-07-31 6:07 Anil Belur
0 siblings, 0 replies; only message in thread
From: Anil Belur @ 2014-07-31 6:07 UTC (permalink / raw)
To: lisa, andreas.dilger, bergwolf, gregkh; +Cc: devel, linux-kernel, Anil Belur
- 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>
---
drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 5 +++--
1 file 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 91d028b..efd45e5 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];
--
1.9.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-07-31 6:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-31 6:07 [PATCH] staging: lustre: ldlm: ldlm_resource.c - fix dereferenceing user space buffer Anil Belur
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox