From: Dan Carpenter Date: Mon, 22 Dec 2014 07:52:39 +0000 (+0300) Subject: Staging: lustre: error handling tweaks in obd_ioctl_getdata() X-Git-Tag: omap-for-v4.1/prcm-dts-mfd-syscon-fix~83^2~321 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3b66ea435234aab8fd8f389e929baedb556726c4;p=pandora-kernel.git Staging: lustre: error handling tweaks in obd_ioctl_getdata() 1) The places which called copy_from_user() were returning the number of bytes not copied instead of -EFAULT. 2) The user could trigger a memory leak if the condition "(hdr.ioc_len != data->ioc_len)" was true. Instead of adding a new call to OBD_FREE_LARGE(), I created a free_buf label and changed everything to use that label. Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed