Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp822966pxb; Tue, 3 Nov 2020 13:33:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJyWvR64OAQGYrUWahzJjS8OxBerCV+jqFJPBoWT6bR06cEhZetZIgfD5LkM7wyRSpzR8Eie X-Received: by 2002:a17:906:c186:: with SMTP id g6mr20958027ejz.465.1604439188546; Tue, 03 Nov 2020 13:33:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604439188; cv=none; d=google.com; s=arc-20160816; b=JdP2WX59GAIV2QJnVBcL3I4wKsswZVo3WCIE5+ysNC2A6TuxBsXwzKnJx04rVXq7Fk xTdntXjeQPgNFEZgGXWXyu/M4lQRGihuINLdcGKgDMxN5cIZOjxjbRuYVvA+WwQsdH0c A9YblVYYNw37fB6HTZwXhgfRzV4IZz4b4j7brEQJIcIhNQEShZWNQnfOk16E/CpbSPNH pQmOBZz3Wpoha2aiVBeBWOynrM4igZCFhanEkYZG18yqXjeZQUlB9aFoulTDtrU3XC6Q LCNOapoZw547MJHX+cWlIvFKjs59bMQzkimVek+wV2okpgMafIiIAfY6ppYpeTQQ5GjF 1glA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=3o192Ju8cqZgTIz9CYSMbUYw55dncheliTohqZlwiD4=; b=GEWtEUWOL3d3FQCpRd5qYEGCMhVZ4ntEhb9yBmd5YWpdDvqjqw5zYhhN0PzoA8L9IN 3+FxrDZ1yb3MDOWEjhKLY7mQNwseYop5tYTPTQtgVnxfGamLXdTuTv4f6lbiG49PDqLV scwFIwac++v1dwMPGWPBypn79y3/MT1JuMKKtvsA6eyYsrNFDmmAMWj1HThC2dFSPOFV zAA+x2mTr/IZdYJsqzbydD9dgE/bgfViNVIFwFOf1LbIMqzxyU0IAbUVgo+Hc4Atpy/s MtyXKZL38x4r4sgh5jZvWNsAzi5jJvgfBcDdtVwNpR47wYFKzhV8NqeQAm2bEVynDKGI 9AdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=a9IAY3gf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id zc3si17895ejb.158.2020.11.03.13.32.45; Tue, 03 Nov 2020 13:33:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=a9IAY3gf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733169AbgKCU75 (ORCPT + 99 others); Tue, 3 Nov 2020 15:59:57 -0500 Received: from mail.kernel.org ([198.145.29.99]:35290 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730777AbgKCU7w (ORCPT ); Tue, 3 Nov 2020 15:59:52 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 26E52223AC; Tue, 3 Nov 2020 20:59:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604437192; bh=3KSKvUm5ZkRkwxCc0W0Zk+dSy3snRkDj8hsCqDGc6w4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=a9IAY3gfPPmWiEPSTR6d7sl1bQwZaN32nr6yylaskgN62Tlp8/XkDMd09THP8j2Vg MxfLAE8fVuEJUxQSZdJeWEHBWXs24IaS9LiEs/9hmrek17Js6tOz5JeYXT3YImZl4X Sd9q7xGtCvsYfh/a5fHp7NlyZotaRPIiW1F01R2Q= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alex Deucher , Nicholas Kazlauskas , Takashi Iwai Subject: [PATCH 5.4 185/214] drm/amd/display: Dont invoke kgdb_breakpoint() unconditionally Date: Tue, 3 Nov 2020 21:37:13 +0100 Message-Id: <20201103203308.043227567@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201103203249.448706377@linuxfoundation.org> References: <20201103203249.448706377@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Takashi Iwai commit 8b7dc1fe1a5c1093551f6cd7dfbb941bd9081c2e upstream. ASSERT_CRITICAL() invokes kgdb_breakpoint() whenever either CONFIG_KGDB or CONFIG_HAVE_KGDB is set. This, however, may lead to a kernel panic when no kdb stuff is attached, since the kgdb_breakpoint() call issues INT3. It's nothing but a surprise for normal end-users. For avoiding the pitfall, make the kgdb_breakpoint() call only when CONFIG_DEBUG_KERNEL_DC is set. https://bugzilla.opensuse.org/show_bug.cgi?id=1177973 Cc: Acked-by: Alex Deucher Reviewed-by: Nicholas Kazlauskas Signed-off-by: Takashi Iwai Signed-off-by: Alex Deucher Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/amd/display/dc/os_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/gpu/drm/amd/display/dc/os_types.h +++ b/drivers/gpu/drm/amd/display/dc/os_types.h @@ -57,7 +57,7 @@ * general debug capabilities * */ -#if defined(CONFIG_HAVE_KGDB) || defined(CONFIG_KGDB) +#if defined(CONFIG_DEBUG_KERNEL_DC) && (defined(CONFIG_HAVE_KGDB) || defined(CONFIG_KGDB)) #define ASSERT_CRITICAL(expr) do { \ if (WARN_ON(!(expr))) { \ kgdb_breakpoint(); \