lkml.org 
[lkml]   [2007]   [Jul]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] posix-timer: fix deletion race
From
Date
On Tue, 2007-07-17 at 17:07 +0400, Oleg Nesterov wrote:
> I think we can make a simpler patch,
>
> --- posix-timers.c~ 2007-06-29 14:45:04.000000000 +0400
> +++ posix-timers.c 2007-07-17 16:59:45.000000000 +0400
> @@ -449,6 +449,9 @@ static void release_posix_timer(struct k
> idr_remove(&posix_timers_id, tmr->it_id);
> spin_unlock_irqrestore(&idr_lock, flags);
> }
> +
> + spin_unlock_wait(tmr->it_lock);
> +
> sigqueue_free(tmr->sigq);
> if (unlikely(tmr->it_process) &&
> tmr->it_sigev_notify == (SIGEV_SIGNAL|SIGEV_THREAD_ID))
>
>
> What do you think? Instead of complicating the lock_timer(), release_posix_timer()
> just makes sure that nobody can "use" tmr.

Hmm, I prefer to fix that at the place where the race actually happens.

tglx


-
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: 2007-07-17 19:05    [W:0.070 / U:12.292 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site