staging: lustre: obdclass: return -EFAULT if copy_from_user() fails
authorDan Carpenter <dan.carpenter@oracle.com>
Sat, 26 Aug 2017 06:04:18 +0000 (09:04 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Aug 2017 08:24:06 +0000 (10:24 +0200)
commit092c3def24bb68a00ff58c76ed67b9ff448387ce
treee7b7a081dc2fafcebd3ece90a5047b0e16806b70
parent3ca121c2f4be85f3fbf398583bc8c42a145e3533
staging: lustre: obdclass: return -EFAULT if copy_from_user() fails

The copy_from_user() function returns the number of bytes which we
weren't able to copy.  We don't want to return that to the user but
instead we want to return -EFAULT.

Fixes: d7e09d0397e8 ("staging: add Lustre file system client support")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/obdclass/class_obd.c