Re: [PATCH/RFC] Futex mmap_sem deadlock

Linus Torvalds
2005-02-23T15:53:40Z

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