loops in get_user_pages() for VM_IO

From: David S. Miller
Date: Tue Nov 16 2004 - 21:16:40 EST



Some time recently, I don't know when, the logic in get_user_pages()
appears to have been changed a bit.

The inner-most loop of this routine basically does:

while (follow_page() returns NULL)
try handle_mm_fault();

The problem with this is that for !pfn_valid()
(for example, VM_IO areas mapping to I/O physical
address which have no assosciated page struct) follow_page()
will _always_ return NULL.

So when X tries to mmap() the frame buffer on my
system it loops forever here now.

Is pfn_valid() supposed to return true for I/O areas
too? If so, where does the struct page backing store
come from?

It could be argued that setting VM_LOCKED is invalid.
And not setting it in drivers/video/sbuslib.c would make
this hang go away, but the above analysis means that
make_pages_present() cannot work on VM_IO areas.
-
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/