public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@davemloft.net>
To: linux-kernel@vger.kernel.org
Subject: loops in get_user_pages() for VM_IO
Date: Tue, 16 Nov 2004 17:53:28 -0800	[thread overview]
Message-ID: <20041116175328.5e425e01.davem@davemloft.net> (raw)


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.

             reply	other threads:[~2004-11-17  2:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-17  1:53 David S. Miller [this message]
2004-11-17  2:07 ` loops in get_user_pages() for VM_IO 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20041116175328.5e425e01.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox