]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/display: Don't invoke kgdb_breakpoint() unconditionally
authorTakashi Iwai <tiwai@suse.de>
Fri, 23 Oct 2020 07:46:55 +0000 (09:46 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 26 Oct 2020 21:19:15 +0000 (17:19 -0400)
commitea00f345a360a94378c65b9d8c1c8b487ad7dd9e
tree7c6217bfcf0da1ee3c6446b3f09aec10409f642e
parent309f0fad6d5e260cb67d870af32ea79fc86495c9
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: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/os_types.h