Re: [PATCH][RFC][0/4] InfiniBand userspace verbs implementation
From: Andrew Morton
Date: Mon Apr 25 2005 - 18:16:57 EST
Timur Tabi <timur.tabi@xxxxxxxxxxx> wrote:
> Andrew Morton wrote:
> > This is because there is no file descriptor or anything else associated
> > with the pages which permits the kernel to clean stuff up on unclean
> > application exit. Also there are the obvious issues with permitting
> > pinning of unbounded amounts of memory.
> Then that might explain the "bug" that we're seeing with get_user_pages(). We've been
> assuming that get_user_pages() mappings are permanent.
They are permanent until someone runs put_page() against all the pages.
What I'm saying is that all current callers of get_user_pages() _do_ run
put_page() within the same syscall or upon I/O termination.
> Well, I was just about to re-implement get_user_pages() support in our driver to
> demonstrate the bug. I guess I'll hold off on that.
> If you look at the Infiniband code that was recently submitted, I think you'll see it does
> exactly that: after calling mlock(), the driver calls get_user_pages(), and it stores the
> page mappings for future use.
bix:/usr/src/linux-2.6.12-rc3> grep -rl get_user_pages .
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/