Thread (14 messages) 14 messages, 6 authors, 2017-08-07

Re: [PATCH 4/7] signal/mips: Document a conflict with SI_USER with SIGFPE

flat view

From: Ralf Baechle <hidden>
Date: 2017-08-07 19:55:40
Also in: linux-arch, lkml

Possibly related (same subject, not in this thread)

On Mon, Aug 07, 2017 at 10:41:39AM -0700, Linus Torvalds wrote:
On Mon, Aug 7, 2017 at 9:18 AM, Maciej W. Rozycki [off-list ref] wrote:
quoted
 So what would be the right value of `si_code' to use here for such an
unexpected exception condition?  I think `BUG()' would be too big a
hammer here.  Or wouldn't it?
Hell no. NEVER EVER BUG().

The only case to use BUG() is if there is some core data structure
(say, kernel stack) that is so corrupted that you know you cannot
continue. That's the *only* valid use.

If this is a "this condition cannot happen" issue, then just remove
the damn conditional. It's pointless. Adding a BUG() to show "this
cannot happen" is not acceptable.
I queued a patch to remove the code for 4.14.

  Ralf
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help