Re: Ugh in 2.1.60

Linus Torvalds (torvalds@transmeta.com)
Thu, 30 Oct 1997 19:57:49 -0800 (PST)


On Thu, 30 Oct 1997, Bill Hawes wrote:

> Linus Torvalds wrote:
>
> > Getting a "ugh" in do_page_fault indicates that somebody does a copy
> > to/from user space with interrupts disabled. That is a _bug_.
> >
> > I suspect it is some specific subsystem that does this, because I've
> > never seen it myself. It would be good if people who see this try to
> > notice what they tend to be doing when it happens, so that we might be
> > able to find out exactly _what_ it is that tries to take a page fault
> > with interrupts disabled..
>
> Oh, well in that case ...
>
> There are quite a few places in various drivers (serial, IDSN, etc.)
> that do a copy_xx_user with interrupts turned off.
>
> Looks like it would be good for the driver maintainers to check the
> files for such occurrences and review what changes are needed.

Right. One thing I've also considered is to make a debugging version of
"copy_to_user()" and friends, that _verify_ that the local interrupts are
not blocked. That's a lot more likely to catch things than the page
faulting behaviour (because page faults are reasonably rare, after all,
especailly if you have enough memory like I do..)

Linus