staging/lustre: Use proper number of bytes in copy_from_user
authorJian Yu <jian.yu@intel.com>
Mon, 21 Nov 2016 05:46:48 +0000 (00:46 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 21 Nov 2016 10:13:14 +0000 (11:13 +0100)
commit8d130c3b0fb6d7eddbe985ff941845f70b043957
tree68d150ae60d04d968c4fd65a80b51006b38f4651
parent354872712e2008eb1307b68e4940587f2c0762d5
staging/lustre: Use proper number of bytes in copy_from_user

This patch removes the usage of MAX_STRING_SIZE from
copy_from_user() and just copies enough bytes to cover
count passed in.

Signed-off-by: Jian Yu <jian.yu@intel.com>
Reviewed-on: http://review.whamcloud.com/23462
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8774
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/obdclass/lprocfs_status.c