signal handling: don't use BUG_ON() for debugging
These are indeed "should not happen" situations, but it turns out recent
changes made the 'task_is_stopped_or_trace()' case trigger (fix for that
exists, is pending more testing), and the BUG_ON() makes it
unnecessarily hard to actually debug for no good reason.
It's been that way for a long time, but let's make it clear: BUG_ON() is
not good for debugging, and should never be used in situations where you
could just say "this shouldn't happen, but we can continue".
Use WARN_ON_ONCE() instead to make sure it gets logged, and then just
continue running. Instead of making the system basically unusuable
because you crashed the machine while potentially holding some very core
locks (eg this function is commonly called while holding 'tasklist_lock'
for writing).
Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
mentioned in commit fc82bbf4
-
mentioned in commit b91312b5
-
mentioned in commit 33d2f83e
-
mentioned in commit a0775288
-
mentioned in commit e23cfb3f
-
mentioned in commit 8b07022d
-
mentioned in commit f2eef5a2
-
mentioned in commit 5af3f2a6
-
mentioned in commit 31d3649b
-
mentioned in commit 93d9cef5
-
mentioned in commit c5a7f954
-
mentioned in commit 58b94325
-
mentioned in commit ec0c62a2
-
mentioned in commit cbc98dcc
-
mentioned in commit db738f76