Re: [patch] i386: handle_BUG(): don't print garbage if debug infounavailable

From: Linus Torvalds
Date: Tue Jul 11 2006 - 13:00:30 EST




On Tue, 11 Jul 2006, Nick Piggin wrote:
>
> OK but you don't need a do/while(0) here.

Actually, the way Andrew wrote it, it _is_ needed. It does two things:

- it's the block scope that allows the private variables
- if the "get_user()" fails, the "break" means that you don't have to
have a goto.

That said, I think it's wrong to use "__get_user()", which can hang on the
MM semaphore if something is bogus. We should probably mark us as being
"in_atomic()" to make sure that the page fault handler, if it is entered,
will not try to get the semaphore or page anything in.

But that's a separate issue.

Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/