[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220302125922.xigz7wg6w2y7rufp@liuwe-devbox-debian-v2>
Date: Wed, 2 Mar 2022 12:59:22 +0000
From: Wei Liu <wei.liu@...nel.org>
To: Iouri Tarassov <iourit@...ux.microsoft.com>
Cc: kys@...rosoft.com, haiyangz@...rosoft.com, sthemmin@...rosoft.com,
wei.liu@...nel.org, linux-hyperv@...r.kernel.org,
linux-kernel@...r.kernel.org, spronovo@...rosoft.com,
spronovo@...ux.microsoft.com, gregkh@...uxfoundation.org
Subject: Re: [PATCH v3 08/30] drivers: hv: dxgkrnl: Creation of dxgcontext
objects
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.
Powered by blists - more mailing lists