Received: by 10.192.165.148 with SMTP id m20csp581853imm; Wed, 25 Apr 2018 04:39:01 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqUpQLcWoaCHuB6Lvk2dUmmuGQ1fr5nAI36EWuBP9e8XjGodKD2fBqpaKlA/eeexYLZWfRd X-Received: by 2002:a17:902:7c95:: with SMTP id y21-v6mr4569766pll.76.1524656341535; Wed, 25 Apr 2018 04:39:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524656341; cv=none; d=google.com; s=arc-20160816; b=zRP+aZyG9WPVDp7s+57KzzWfF3FY/+W6pvpAXO3sojAlSQmNJR92CM4k97zS3bShdB x353HPZO1rby8EHrd/tR6Ru2Sg9TY1w7qtyogi711D4fyGJsvGZsS4Lc7IwTdSguNlh6 3AqCvrw6MLGZrBHMXvub4mIi9vFIFWJ0vIUhQYzb4WqqtT+HlwOtBYQXAUMZLhe0hExK wUtdU04s69GmYVJ/Sab090PeJf1r2i+P8mWh0Ntd4xGExRs8om+oqJE3M+ENcy9nLR3y VXyS/51tl3BCS/U6+koSigKTpuS7g2pr1W/h8IBrXV0pw4lVA2K+8JHHCZK6RHCHk6Sf P1Zg== 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=NynLDIBlHidOzHUyyXGHd2zKt4Qcx+PO9AfQUV6Z/r8=; b=LLLDym4dHYMGewLv91FzutgxIgTLMdNGPtwBjAUm6vI807mygjic5GeYuxzoKWfMzq n2VMhMw8tOvryewL7ZLp68IJUz6tQe1prakq9KDQo/KwaKnaaap7ih5fznNa3Phvs3JF pSc5pzXyLfLNvUHGppMit3q/yw2W9oGiMgHhwIjqPOagmI3tffJ254v/jC3OFOn41ReH 5AYu3lW9Iuddr49HUElEfPp0WwEYXqOtsvXp9GSM49KYmrvFGLO0oVA1SgdUcZzUujYB tX7ezc9WkrDAmI+uJmTZYy2lAwwK+RAAij7QLrWS3zhQBt0DEmS5ZfuuhBIl1buQwTex ta8Q== 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 s6-v6si17946886plp.18.2018.04.25.04.38.47; Wed, 25 Apr 2018 04:39:01 -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 S1753256AbeDYLgn (ORCPT + 99 others); Wed, 25 Apr 2018 07:36:43 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:50732 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752075AbeDYKdy (ORCPT ); Wed, 25 Apr 2018 06:33:54 -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 C43EE41C; Wed, 25 Apr 2018 10:33:53 +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.16 10/26] drm/i915/gvt: throw error on unhandled vfio ioctls Date: Wed, 25 Apr 2018 12:33:19 +0200 Message-Id: <20180425103315.261058445@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180425103314.842517924@linuxfoundation.org> References: <20180425103314.842517924@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.16-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 @@ -1284,7 +1284,7 @@ static long intel_vgpu_ioctl(struct mdev } - return 0; + return -ENOTTY; } static ssize_t