Received: by 10.213.65.68 with SMTP id h4csp419712imn; Tue, 13 Mar 2018 08:29:54 -0700 (PDT) X-Google-Smtp-Source: AG47ELsbKjkR6TD3I7qYR61tMNj/Kyc8ZerS4VlOhKlg+NMSvbtjw6NmG1fEQBTB72mFptdFxq63 X-Received: by 10.101.76.204 with SMTP id n12mr815902pgt.249.1520954994419; Tue, 13 Mar 2018 08:29:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520954994; cv=none; d=google.com; s=arc-20160816; b=BZRz/vkJ7rr3fyt3fTQJXpXX5ZYUYcg+g+nssKwCG5kxb5/CtFlnQrJOfkxYUt7ptg zXusRl76IBkQVItY5Bx1HyKGMiyhj8G2iejD6aGkYjlO0nUb5cKVNPxqK209WXgTVTWx 90uAU6fClBoC4rTgI85vqOz1bWwY21kGsPf2vVe3Z90EMSpr9bU9jkOT8dVbgHQpKUWq IQEph/6/E4K/Ry5OSj6jjHyWuChBQIJ7yVpCBnCH+nSJ0IUzEy/9khjqW0TbzKQf7Tbt 2zP1TbJ+Fj646yCon6hH1X1AnfG/HRtVjsGAE4Z7l0g0QpssTlqLe2bUQ5dXpo97N79i FNpw== 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=zRdBfLbG5Z3zfvNGxnAd0cxzMq8HKKCcxRaEnyXBZ2I=; b=EtchgDrd9wgsNKDr22/OcM93aRSAF3p9VBAo6E+SCtqj9HwPnBKXE6VIkt2GuqQ3uM PX96tWdw6UmTrleUeprZBnMHl0Brs0aGzF78U3NPmceTTsRO2zaG5gCEQNlh2o5HHBvh WB34s3w5ImBBRiCPzVDJTJPSAAlfcgdHb5buDMzc7dOarGzD8e3n4o9WMyl+fIgfZ35D FW/F7L7Poat5ZQDf448BiF/bqx0bfw3uDGnxbOXmFAF6drXS2u6emWoDK3tPpVjz2Knf tujhYyREgE90gDPHyzxE/PLu6nsJD4tMBu0UyHt7977//qIOiHHupb4EFNuWZ5cOvct8 sGKA== 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 t18si309729pfg.246.2018.03.13.08.29.39; Tue, 13 Mar 2018 08:29:54 -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 S932688AbeCMP2Q (ORCPT + 99 others); Tue, 13 Mar 2018 11:28:16 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:57464 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752164AbeCMP2N (ORCPT ); Tue, 13 Mar 2018 11:28:13 -0400 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 6736211DA; Tue, 13 Mar 2018 15:28:12 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Thomas Gleixner , Jaswinder Singh Rajput , Jani Nikula , Mika Kahola , Rodrigo Vivi Subject: [PATCH 4.15 009/146] drm/i915: Check for fused or unused pipes Date: Tue, 13 Mar 2018 16:22:56 +0100 Message-Id: <20180313152321.327491132@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180313152320.439085687@linuxfoundation.org> References: <20180313152320.439085687@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.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Mika Kahola commit 9965db26ac0548648309f506dc155a92daa2158f upstream. We may have fused or unused pipes in our system. Let's check that the pipe in question is within limits of accessible pipes. In case, that we are not able to access the pipe, we return early with a warning. v2: Rephrasing of the commit message (Jani) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103206 Reported-by: Thomas Gleixner Tested-by: Jaswinder Singh Rajput Suggested-by: Jani Nikula Reviewed-by: Jani Nikula Signed-off-by: Mika Kahola Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1513584243-12607-1-git-send-email-mika.kahola@intel.com (cherry picked from commit 0b7029b7e43fda1304c181a3ade0b429b9edcd9d) Signed-off-by: Rodrigo Vivi Cc: # v4.10+ Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/i915/intel_audio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/gpu/drm/i915/intel_audio.c +++ b/drivers/gpu/drm/i915/intel_audio.c @@ -754,7 +754,7 @@ static struct intel_encoder *get_saved_e { struct intel_encoder *encoder; - if (WARN_ON(pipe >= INTEL_INFO(dev_priv)->num_pipes)) + if (WARN_ON(pipe >= ARRAY_SIZE(dev_priv->av_enc_map))) return NULL; /* MST */