Re: Debug: sleeping function called from invalid context

From: Matt Mackall
Date: Tue Aug 19 2003 - 00:22:11 EST


On Mon, Aug 18, 2003 at 08:35:13PM -0700, Andrew Morton wrote:
> "Randy.Dunlap" <rddunlap@xxxxxxxx> wrote:
> >
> > Debug: sleeping function called with interrupts disabled at
> > include/asm/uaccess.h:473
>
> OK, now my vague understanding of what's going on is that the app has
> chosen to disable local interupts (via iopl()) and has taken a vm86 trap.
> I guess we'd see the same thing if the app performed some sleeping syscall
> while interrupts are disabled.

Ok, I think I've managed to reproduce this and show that it's not a
case of calling syscalls with interrupt disabled.

There's a utility called savetextmode that's part of svgalib (apt-get
svgalib-bin for Debian folks). If you configure it to use VESA, it
will call out to your video card bios and reproduce the error, just as
I expected.

I had kgdb handy and already running on a machine, so I set a
breakpoint in sys_vm86old (X would use sys_vm86, but the results would
be the same) and traced into it. About the first thing it does is call
copy_from_user, which checks might_sleep, which remained silent.

--
Matt Mackall : http://www.selenic.com : of or relating to the moon
-
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/