Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 29dd4f9b authored by Anil Belur's avatar Anil Belur Committed by Greg Kroah-Hartman
Browse files

staging: lustre: ptlrpc: lproc_ptlrpc.c - fix dereferenceing user space buffer



- this fixes sparse warning for directly deferencing user space buffer

drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c:652:33: warning: incorrect type in argument 2 (different address spaces)
drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c:652:33:    expected void const [noderef] <asn:1>*from
drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c:652:33:    got char const *buffer

Signed-off-by: default avatarAnil Belur <askb23@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f1555465
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -628,7 +628,8 @@ static int ptlrpc_lprocfs_nrs_seq_show(struct seq_file *m, void *n)
 * if the optional token is omitted, the operation is performed on both the
 * regular and high-priority (if the service has one) NRS head.
 */
static ssize_t ptlrpc_lprocfs_nrs_seq_write(struct file *file, const char *buffer,
static ssize_t ptlrpc_lprocfs_nrs_seq_write(struct file *file,
					const char __user *buffer,
					size_t count, loff_t *off)
{
	struct ptlrpc_service *svc = ((struct seq_file *)file->private_data)->private;