Commit 8b7dc1fe authored by Takashi Iwai's avatar Takashi Iwai Committed by Alex Deucher

drm/amd/display: Don't invoke kgdb_breakpoint() unconditionally

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: <stable@vger.kernel.org>
Acked-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Reviewed-by: default avatarNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 920bb38c
...@@ -94,7 +94,7 @@ ...@@ -94,7 +94,7 @@
* general debug capabilities * 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 { \ #define ASSERT_CRITICAL(expr) do { \
if (WARN_ON(!(expr))) { \ if (WARN_ON(!(expr))) { \
kgdb_breakpoint(); \ kgdb_breakpoint(); \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment