Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp280491pxm; Wed, 2 Mar 2022 15:18:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJwg3XLIMWvZyBrEIg6BkqFf2GTcg7VU8geRAcB/G9vDWRBBqgJHom79Y/8v4UHokjPm2TIE X-Received: by 2002:a05:6a00:781:b0:4f4:2a:2d89 with SMTP id g1-20020a056a00078100b004f4002a2d89mr20353751pfu.13.1646263108601; Wed, 02 Mar 2022 15:18:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646263108; cv=none; d=google.com; s=arc-20160816; b=TWjhD6DkPUrYEnDHqPcWDl+ITKJfmI5XVUhCXBn/9lL6KxfVwLxXOGCHdjdyyAAREi 0Q30/S7fMjPbsSnGrU6qNFdfBTZKkWusznYfCBLCWXaEd0OkXPSuCBKZ5Pj9Iym+7Bk5 3519dVvDc5YnQlW2GrCMCIxBQdWyYb056TyUmS+UOr9HXEWLVlnGCJ3DaJjh3D7Li/Kf ydFTJ2rBrEKEpwUgtmleV1uJlLK69RUqI35laBZPJeXzpgL1Q3/z4WySoiP0bUKC0RBo hG+GGsCI4uuUmvldSIG/b7/sbtAfIV8ujVmQWhtJMuspDp/o9VlS0SMvq+Kcb+BWZ96U qFCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=Z3SBnBsWmEFDQGmZ5b7CEI2YNsuIbEYxHeROS2OrNro=; b=t8fNaAoPjFte7o730KkYLzgiXLIvUEN+nYXnvWjAYz5K+omhePP4Pmu2N2LyFhNMNd 5RlMPSLBS4cf0BpogWPIIYx4U/DyQPOiK8NBt3blWH1Zuv5f1NxhOCq0PV67c9saeMAg TZzX82m2lng0P7qvZ8Sd8ybucjsmw7Dy5Yj+Z1HfLgoNFosw+H8UuK/JASzSPgmociT9 Q73E56KU1SakYkqOe89GvwYID9N+KnmCAs8diwOJUU2X8leSPSJAi8bzvTf1Ip/JJ31A J2NCwqirPZ7OZ44/W50peQzwI8dWKa3srs8kGpLZdH9c66kwawdtWF5QmvILDtg6/gXI dlWQ== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id i3-20020a170902cf0300b0015013fe38cfsi384798plg.449.2022.03.02.15.18.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Mar 2022 15:18:28 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id F127C1385BD; Wed, 2 Mar 2022 14:55:18 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242006AbiCBNAJ (ORCPT + 99 others); Wed, 2 Mar 2022 08:00:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234065AbiCBNAI (ORCPT ); Wed, 2 Mar 2022 08:00:08 -0500 Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 613DCB91D8; Wed, 2 Mar 2022 04:59:25 -0800 (PST) Received: by mail-wm1-f52.google.com with SMTP id r65so1088917wma.2; Wed, 02 Mar 2022 04:59:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Z3SBnBsWmEFDQGmZ5b7CEI2YNsuIbEYxHeROS2OrNro=; b=KEb+jtJeYI5nj+Jy7jZUHl+0ImClrNaPRg7gxhv/nihRSr7acYulAOEl62psCkfxtZ v7Ls9aswpQoDl4KGT2gvZcVGrid12Qy52NDWu99r4oVhOM3In0b5FzHmMzcVpOzbkx4n sodwuTEXfwjCQAynWnqVc+esfw4no97oaCNo9EHvcnltNgPVleEqMxI+fplPhgA6c1AN 1cBEmSmVcEHampIg023DUTNhaFJ2FBArdQxt2q//B6AJMU6mprempVpY8dRYQlWYJCg8 nysl5ciwz26PNNVCibO9Uc2B5sowtcho6XZNNRQo6yiG0VBMaiQdcVZw9BiE6rReBhIt mI0A== X-Gm-Message-State: AOAM533B99x5ImngUCGLOjy70omt5+ZVVfEc+eucBW6GolhCDDCfNtkJ Zb+HVrKm5v+G+1/M1hM/XoNjMSdYBgo= X-Received: by 2002:a05:600c:3512:b0:382:ee82:b3d1 with SMTP id h18-20020a05600c351200b00382ee82b3d1mr3182173wmq.126.1646225963956; Wed, 02 Mar 2022 04:59:23 -0800 (PST) Received: from liuwe-devbox-debian-v2 ([51.145.34.42]) by smtp.gmail.com with ESMTPSA id m26-20020a05600c3b1a00b003817ab146e9sm7786441wms.44.2022.03.02.04.59.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Mar 2022 04:59:23 -0800 (PST) Date: Wed, 2 Mar 2022 12:59:22 +0000 From: Wei Liu To: Iouri Tarassov Cc: kys@microsoft.com, haiyangz@microsoft.com, sthemmin@microsoft.com, wei.liu@kernel.org, linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org, spronovo@microsoft.com, spronovo@linux.microsoft.com, gregkh@linuxfoundation.org Subject: Re: [PATCH v3 08/30] drivers: hv: dxgkrnl: Creation of dxgcontext objects Message-ID: <20220302125922.xigz7wg6w2y7rufp@liuwe-devbox-debian-v2> References: <719fe06b7cbe9ac12fa4a729e810e3383ab421c1.1646163378.git.iourit@linux.microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.