Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Anil Belur <askb23@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Anil Belur and committed by
Greg Kroah-Hartman
29dd4f9b f1555465

+2 -1
+2 -1
drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c
··· 628 628 * if the optional token is omitted, the operation is performed on both the 629 629 * regular and high-priority (if the service has one) NRS head. 630 630 */ 631 - static ssize_t ptlrpc_lprocfs_nrs_seq_write(struct file *file, const char *buffer, 631 + static ssize_t ptlrpc_lprocfs_nrs_seq_write(struct file *file, 632 + const char __user *buffer, 632 633 size_t count, loff_t *off) 633 634 { 634 635 struct ptlrpc_service *svc = ((struct seq_file *)file->private_data)->private;