Re: [PATCH] export notifier #1

Benjamin Herrenschmidt
2008-01-22T23:36:29Z

On Tue, 2008-01-22 at 12:34 -0800, Christoph Lameter wrote:
>
> - Notifiers are called *after* we tore down ptes. At that point pages
> may already have been freed and reused. This means that there can
> still be uses of the page by the user of mmu_ops after the OS has
> dropped its mapping. IMHO the foreign entity needs to drop its
> mappings first. That also ensures that the entities operated
> upon continue to exist.

That's definitely an issue. Maybe having the foreign entity get a
reference to the page and drop it when it unmaps would help ?

> - anon_vma/inode and pte locks are held during callbacks.

So how does that fix the problem of sleeping then ?

Ben.