Re: [PATCH v3 08/30] drivers: hv: dxgkrnl: Creation of dxgcontext objects

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 01, 2022 at 11:45:55AM -0800, Iouri Tarassov wrote:
[...]
> +static int
> +dxgk_create_context_virtual(struct dxgprocess *process, void *__user inargs)
> +{
> +	struct d3dkmt_createcontextvirtual args;
> +	int ret;
> +	struct dxgadapter *adapter = NULL;
> +	struct dxgdevice *device = NULL;
> +	struct dxgcontext *context = NULL;
> +	struct d3dkmthandle host_context_handle = {};
> +	bool device_lock_acquired = false;
> +
> +	pr_debug("ioctl: %s", __func__);
> +
> +	ret = copy_from_user(&args, inargs, sizeof(args));
> +	if (ret) {
> +		pr_err("%s failed to copy input args", __func__);
> +		ret = -EINVAL;

This should be -EFAULT. This goes for other copy_from_user calls too. You can also
drop the pr_err above.

Thanks,
Wei.



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux