Re: BUG in x86 do_page_fault? [was Re: in_atomic doesn't countlocal_irq_disable?]

From: Linus Torvalds
Date: Sun Jan 04 2004 - 15:45:04 EST




On Sun, 4 Jan 2004, Pavel Machek wrote:
> >
> > Please don't do this, it will result in some _really_ nasty problems with
> > X and other programs that potentially disable interrupts in user
> > space.
>
> If user program causes page fault with interrupts disabled, it is
> certainly buggy, right?

No.

It may do a best-effort thing. It may also do a best-_performance_ thing,
in leaving interrupts disabled over a piece of code that doesn't care,
knowing that disabling interrupts is expensive. Or it may just be a
simple case of simplicity: disable interrupts over the whole region,
knowing that only a part of it matters.

It by no means is automatically a bug. And it unquestionably _does_
happen. We used to warn about it. We stopped.

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/