[PATCH] drm: return -EFAULT if copy_one_buf() fails

Al Viro viro at zeniv.linux.org.uk
Tue Jun 25 23:17:29 UTC 2019


On Tue, Jun 18, 2019 at 03:56:23PM +0300, Dan Carpenter wrote:
> The copy_to_user() function returns the number of bytes remaining to be
> copied, but we want to return -EFAULT.  This function is called from
> __drm_legacy_infobufs() which expects negative error codes.
> 
> Fixes: 5c7640ab6258 ("switch compat_drm_infobufs() to drm_ioctl_kernel()")
> Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com>
> ---
> This goes through Al's tree and not through drm.  Presumably this patch
> will just get folded into the original.

Wha..?  The original has been in mainline since v4.13, so it's a bit too
late to fold anything into it...


More information about the dri-devel mailing list