Loading drivers/gpu/drm/amd/amdkfd/kfd_chardev.c +7 −26 Original line number Diff line number Diff line Loading @@ -559,19 +559,10 @@ static int kfd_ioctl_dbg_address_watch(struct file *filep, /* this is the actual buffer to work with */ args_buff = kmalloc(args->buf_size_in_bytes - sizeof(*args), GFP_KERNEL); if (args_buff == NULL) return -ENOMEM; status = copy_from_user(args_buff, cmd_from_user, args_buff = memdup_user(args_buff, args->buf_size_in_bytes - sizeof(*args)); if (status != 0) { pr_debug("Failed to copy address watch user data\n"); kfree(args_buff); return -EINVAL; } if (IS_ERR(args_buff)) return PTR_ERR(args_buff); aw_info.process = p; Loading Loading @@ -677,22 +668,12 @@ static int kfd_ioctl_dbg_wave_control(struct file *filep, if (cmd_from_user == NULL) return -EINVAL; /* this is the actual buffer to work with */ /* copy the entire buffer from user */ args_buff = kmalloc(args->buf_size_in_bytes - sizeof(*args), GFP_KERNEL); if (args_buff == NULL) return -ENOMEM; /* Now copy the entire buffer from user */ status = copy_from_user(args_buff, cmd_from_user, args_buff = memdup_user(cmd_from_user, args->buf_size_in_bytes - sizeof(*args)); if (status != 0) { pr_debug("Failed to copy wave control user data\n"); kfree(args_buff); return -EINVAL; } if (IS_ERR(args_buff)) return PTR_ERR(args_buff); /* move ptr to the start of the "pay-load" area */ wac_info.process = p; Loading Loading
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c +7 −26 Original line number Diff line number Diff line Loading @@ -559,19 +559,10 @@ static int kfd_ioctl_dbg_address_watch(struct file *filep, /* this is the actual buffer to work with */ args_buff = kmalloc(args->buf_size_in_bytes - sizeof(*args), GFP_KERNEL); if (args_buff == NULL) return -ENOMEM; status = copy_from_user(args_buff, cmd_from_user, args_buff = memdup_user(args_buff, args->buf_size_in_bytes - sizeof(*args)); if (status != 0) { pr_debug("Failed to copy address watch user data\n"); kfree(args_buff); return -EINVAL; } if (IS_ERR(args_buff)) return PTR_ERR(args_buff); aw_info.process = p; Loading Loading @@ -677,22 +668,12 @@ static int kfd_ioctl_dbg_wave_control(struct file *filep, if (cmd_from_user == NULL) return -EINVAL; /* this is the actual buffer to work with */ /* copy the entire buffer from user */ args_buff = kmalloc(args->buf_size_in_bytes - sizeof(*args), GFP_KERNEL); if (args_buff == NULL) return -ENOMEM; /* Now copy the entire buffer from user */ status = copy_from_user(args_buff, cmd_from_user, args_buff = memdup_user(cmd_from_user, args->buf_size_in_bytes - sizeof(*args)); if (status != 0) { pr_debug("Failed to copy wave control user data\n"); kfree(args_buff); return -EINVAL; } if (IS_ERR(args_buff)) return PTR_ERR(args_buff); /* move ptr to the start of the "pay-load" area */ wac_info.process = p; Loading