[PATCH] mm/debug: Change BUG_ON() crashes to survivable WARN_ON() warnings

From: Ingo Molnar
Date: Thu Sep 07 2017 - 03:01:21 EST



* Andy Lutomirski <luto@xxxxxxxxxx> wrote:

> More obviously, if CONFIG_DEBUG_VM=y, we'll trip over an assertion
> in the next context switch. The result of *that* is a failure to
> resume from suspend with probability 1 - 1/6^(cpus-1).

Nice fix, thanks!

On a related note, this bug could have been more debuggable I think.
Could we _please_ change VM_BUG_ON() to WARN_ON() or such?

Here the stupid VM_BUG_ON() crashed Linus's laptop in a totally
undebuggable state ... while a WARN_ON() might have at least
gotten something out to his laptop's screen, right?

So I propose the patch below. Detailed arguments in the changelog.

Pretty please?

==============>