mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-22 14:41:27 +00:00
amdkfd: Copy from the proper user command pointer
8f1d57c172
("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.
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
e8ecde25f5
commit
39c01bf933
1 changed files with 1 additions and 2 deletions
|
@ -558,8 +558,7 @@ static int kfd_ioctl_dbg_address_watch(struct file *filep,
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
/* this is the actual buffer to work with */
|
/* this is the actual buffer to work with */
|
||||||
|
args_buff = memdup_user(cmd_from_user,
|
||||||
args_buff = memdup_user(args_buff,
|
|
||||||
args->buf_size_in_bytes - sizeof(*args));
|
args->buf_size_in_bytes - sizeof(*args));
|
||||||
if (IS_ERR(args_buff))
|
if (IS_ERR(args_buff))
|
||||||
return PTR_ERR(args_buff);
|
return PTR_ERR(args_buff);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue