Framebuffer, mmap(), hanging in D state, root FS unmount failure.

From: Mark J Roberts (mjr@znex.org)
Date: Thu Dec 27 2001 - 14:50:37 EST


#include <assert.h>
#include <sys/mman.h>
#include <fcntl.h>
int main(void)
{
        char *p;
        assert((p = mmap(0, 1, PROT_READ|PROT_WRITE, MAP_SHARED, open("/dev/fb/0", O_RDWR), 0)) != MAP_FAILED);
        p[4096] = 0; /* this hangs */
        return 0;
}

When I run this on my 2.4.17rc2aa2 kernel with a Voodoo3000
framebuffer, the process hangs forever in D state. ps and top will
then hang the same way when they read the /proc/pid files for the
hung process. And my root filesystem won't unmount.

It only happens when PROT_READ|PROT_WRITE is specified - when I use
only PROT_WRITE, the program segfaults like you'd expect.... but
once the PROT_READ|PROT_WRITE version has hung, PROT_WRITE-only
versions will also hang.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Dec 31 2001 - 21:00:15 EST