Re: [PATCH/RFC] Futex mmap_sem deadlock

From: Linus Torvalds
Date: Wed Feb 23 2005 - 10:55:11 EST




On Wed, 23 Feb 2005, Joe Korty wrote:
>
> Perhaps this should be preempt_disable .... preempt_enable.

No, the problem with preempt_disable/enable is that they go away if
preemption is not enabled. So you really do have to do it by hand with the
"inc_preempt_count".

> Otherwise, a preempt attempt in get_user would not be seen
> until some future preempt_enable was executed.

True. I guess we should have a "preempt_check_resched()" there too. That's
what "kunmap_atomic()" does too (which is what we rely on in the other
case we do this..)

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/