Re: [PATCH/RFC] Futex mmap_sem deadlock

From: Linus Torvalds
Date: Tue Feb 22 2005 - 16:33:29 EST




On Wed, 23 Feb 2005, Benjamin Herrenschmidt wrote:
>
> Isn't Olof scheme racy ? Can't the stuff get swapped out between the
> first get_user() and the "real" one ?

Yes. But see my suggested modification (which I still think is "the thing
that Olof does", except it's more efficient and avoids the race).

If rwsems acted like rwlocks, we wouldn't have this issue at all.

Linus
-
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/