Re: [PATCH] amdkfd: Copy from the proper user command pointer

From: Al Viro
Date: Fri Jan 15 2016 - 14:09:45 EST


On Fri, Jan 15, 2016 at 07:26:44PM +0100, Borislav Petkov wrote:
> From: Borislav Petkov <bp@xxxxxxx>
>
> 8f1d57c17248 ("amdkfd: don't open-code memdup_user()") mistakenly uses
> an uninitialized local pointer, gcc complains:
>
> drivers/gpu/drm/amd/amdkfd/kfd_chardev.c: In function âkfd_ioctl_dbg_address_watchâ:
> drivers/gpu/drm/amd/amdkfd/kfd_chardev.c:562:12: warning: âargs_buffâ may be used uninitialized in this function [-Wmaybe-uninitialized]
> args_buff = memdup_user(args_buff,
> ^
>
> Fix it.

Mea culpa... Applied, and I wonder how the hell I'd missed that..