Received: by 10.192.165.148 with SMTP id m20csp525206imm; Wed, 25 Apr 2018 03:39:56 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+k7Ln7tSSuW5TPW/pjl5tGNScSpfkVkQVbdZQXvC200k2zj/djCExOCawEHLhgOrIpDiUO X-Received: by 10.99.176.71 with SMTP id z7mr22727828pgo.74.1524652796899; Wed, 25 Apr 2018 03:39:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524652796; cv=none; d=google.com; s=arc-20160816; b=rcciNQqWqsqbmMZJB8MbJlcqjpH6FqXgUeqJjydtGR4Cs7pkUasr0VDoQPXAPw2pDT UmCRdQ84otCgZ8Hg9fJ+x9ZsvKDajr2w28pOaPQg/MJEWIzVOfEL/eixfpWWddALJ0G9 bxh6L0l3DLnUsaakQTzW2P5Pri+BEu+hjUoiVDvdlxK4TIYz9t4tYxqwDya7Z41NiWRe EvZtXae9jZppbPzXUpIYGl0eg467gGbLbjTsNx5sMWYEuL+WQAygu9pdQp97OHuXHwlg jOOa79LmtL1pTH4H4vqrFmOClPTLFPeAuw36ISLGuDsf5Q90qcYeKoD8WLwUIP1buKy7 NgAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=lvRmiAXZAqfwAypE1SGggqjy27DNSac9JGWeFJdEn34=; b=aoI7n9PbZPfhhSQiJaWVwVzM+ia8FeDXnLvl9evHx6m2l4l7n3Bh31ySbMOknFMpkD cEKL6Xpv62LWG+1njStq3VbXwmdNfdYqLqTiikwhVDMTfpXru8qhJIQS1AUxqJ+ZtUqk uyfEDNUAGLK3ZRC9BhPjPCr7uFCtiAtg8CCJ0/wweASoZrwZA1P5OARa/WAgZ/PBlBXH Q6cT5f/X7eHvLFnniA1RVwh947HxBDgM5XHLlUY1X70CefNXKWL6SEVT9X3kR2ompZ1l PNNXyupGgNxLWOiqXDkdUXlfz2RPGlACjlTtDZPMCbDGSSBPRb/nPwnb6A+oYHNrYGTj 4zsw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r3-v6si17787752pli.324.2018.04.25.03.39.42; Wed, 25 Apr 2018 03:39:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753399AbeDYKiG (ORCPT + 99 others); Wed, 25 Apr 2018 06:38:06 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:51262 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751451AbeDYKiC (ORCPT ); Wed, 25 Apr 2018 06:38:02 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 881F349F; Wed, 25 Apr 2018 10:38:01 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Gerd Hoffmann , Alex Williamson , Zhenyu Wang Subject: [PATCH 4.14 007/183] drm/i915/gvt: throw error on unhandled vfio ioctls Date: Wed, 25 Apr 2018 12:33:47 +0200 Message-Id: <20180425103242.903050776@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180425103242.532713678@linuxfoundation.org> References: <20180425103242.532713678@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Gerd Hoffmann commit 9f591ae60e1be026901398ef99eede91237aa3a1 upstream. On unknown/unhandled ioctls the driver should return an error, so userspace knows it tried to use something unsupported. Cc: stable@vger.kernel.org Signed-off-by: Gerd Hoffmann Reviewed-by: Alex Williamson Signed-off-by: Zhenyu Wang Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/i915/gvt/kvmgt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/gpu/drm/i915/gvt/kvmgt.c +++ b/drivers/gpu/drm/i915/gvt/kvmgt.c @@ -1153,7 +1153,7 @@ static long intel_vgpu_ioctl(struct mdev return 0; } - return 0; + return -ENOTTY; } static ssize_t