Re: [PATCH/RFC] Futex mmap_sem deadlock

Linus Torvalds
2005-02-22T21:58:54Z

On Tue, 22 Feb 2005, Andrew Morton wrote:
>
> However the pte can get unmapped by memory reclaim so we could still take a
> minor fault, and hit the same deadlock, yes?

You _could_ fix that by getting the pagetable spinlock, I guess. Which
check_user_page_readable() assumes you'd be holding anyway (not holding it
would appear to be a bug).

At which point you might as well just walk the tables by hand and just do
the read that way. Of course, then you have virtual aliasing issues etc.

Insane, but possible.

Linus