lkml.org 
[lkml]   [2005]   [Sep]   [25]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateSat, 24 Sep 2005 22:44:49 -0700
FromAndrew Morton <>
SubjectRe: [PATCH] fix exit_itimers() vs posix_timer_event() AB-BA deadlock
Oleg Nesterov <oleg@tv-sign.ru> wrote:
>
> +	/*
>  +	 * We are locking ->it_lock + tasklist_lock backwards
>  +	 * from release_task()->exit_itimers(), beware deadlock.
>  +	 */
>  +	leader = timr->it_process->group_leader;
>  +	while (unlikely(!read_trylock(&tasklist_lock))) {
>  +		if (leader->flags & PF_EXITING) {
>  +			smp_rmb();
>  +			if (thread_group_empty(leader))
>  +				return 0;
>  +		}
>  +		cpu_relax();
>  +	}

Oh dear.  Is there no way to fix this up by taking the locks in the correct
order?  (Whatever that is).

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-09-25 05:49    [from the cache]
©2003-2008