Whamcloud - gitweb
LU-7624 fld: copy userspace buffer 97/17797/4
authorBob Glossman <bob.glossman@intel.com>
Mon, 4 Jan 2016 19:28:43 +0000 (11:28 -0800)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 12 Jan 2016 02:48:26 +0000 (02:48 +0000)
copy userspace buffer into kernel space before use.

Based on:
 Linux-commit: 48f46e74dc7d1770a69b1dc9ef9a54ab7c3aedc0

    staging: lustre: lustre: fld: lproc_fld.c fixed warning

    fixed warning for line over 80 characters by moving the struct init
    onto a diff line.

Signed-off-by: Anil Belur <askb23@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 Linux-commit: e84962e3afc1665756bd4854c63da662696fb687

    staging: lustre: fix sparse warning on LPROC_SEQ_FOPS macros

    ...

    The patch also fixes one __user pointer direct dereference by
    strncmp() in function fld_proc_hash_seq_write().

Signed-off-by: Tristan Lelong <tristan@lelong.xyz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 Linux-commit: 41dff7ac1a7c97f5532931154bfdf505d7ce1631

    staging: lustre: remove kmalloc from fld_proc_hash_seq_write

    This patch simplifies the fld_proc_hash_seq_write() function
    by removing the dynamic memory allocation.
    The longest fh_name used so far in lustre is 4 characters.
    We use a 8 bytes variable to be on the safe side.

Signed-off-by: Tristan Lelong <tristan@lelong.xyz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I3ca796f12d340753c6fd952587d2592dcfbc80c8
Reviewed-on: http://review.whamcloud.com/17797
Tested-by: Jenkins
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>

No differences found