public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* loops in get_user_pages() for VM_IO
@ 2004-11-17  1:53 David S. Miller
  2004-11-17  2:07 ` David S. Miller
  0 siblings, 1 reply; 8+ messages in thread
From: David S. Miller @ 2004-11-17  1:53 UTC (permalink / raw)
  To: linux-kernel


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.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2004-11-18 20:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-17  1:53 loops in get_user_pages() for VM_IO David S. Miller
2004-11-17  2:07 ` David S. Miller
2004-11-17  6:33   ` Andrew Morton
2004-11-17  6:26     ` David S. Miller
2004-11-17 13:44     ` Andrea Arcangeli
2004-11-17 16:40       ` Andrea Arcangeli
2004-11-17 19:37         ` Hugh Dickins
2004-11-18 19:52           ` [PATCH] " Hugh Dickins

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox