linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [BUG] Race condition with it_real_fn in kernel/itimer.c
@ 2005-06-15 17:39 Oleg Nesterov
  2005-06-15 18:37 ` Steven Rostedt
  0 siblings, 1 reply; 8+ messages in thread
From: Oleg Nesterov @ 2005-06-15 17:39 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: linux-kernel

Steven Rostedt wrote:
>
> +	try_again:
>  		spin_lock_irq(&tsk->sighand->siglock);
>  		interval = tsk->signal->it_real_incr;
>  		val = it_real_value(tsk->signal);
> -		if (val)
> +		if (val) {
> +			spin_unlock_irq(&tsk->sighand->siglock);
>  			del_timer_sync(&tsk->signal->real_timer);
> +			goto try_again;

I think we don't need del_timer_sync() at all, just del_timer().

Because it_real_value() returns 0 when timer is not pending. And
in this case the timer may still be running, but do_setitimer()
doesn't call del_timer_sync().

Oleg.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2005-06-16 14:21 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-15 17:39 [BUG] Race condition with it_real_fn in kernel/itimer.c Oleg Nesterov
2005-06-15 18:37 ` Steven Rostedt
2005-06-15 19:34   ` [PATCH] " Steven Rostedt
2005-06-16  7:44     ` Oleg Nesterov
2005-06-16 11:33       ` Steven Rostedt
2005-06-16 11:44         ` Steven Rostedt
2005-06-16 14:30         ` [PATCH] Re: [BUG] Race condition with it_real_fn inkernel/itimer.c Oleg Nesterov
2005-06-16  9:03   ` [BUG] Race condition with it_real_fn in kernel/itimer.c Oleg Nesterov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).