mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@tv-sign.ru>
To: Roman Zippel <zippel@linux-m68k.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/9] timer locking optimization
Date: Wed, 30 Nov 2005 14:23:44 +0300	[thread overview]
Message-ID: <438D8BC0.1993824F@tv-sign.ru> (raw)
In-Reply-To: <Pine.LNX.4.61.0511300330130.1609@scrub.home>

Roman Zippel wrote:
> 
>  int __mod_timer(struct timer_list *timer, unsigned long expires)
> @@ -210,6 +203,7 @@ int __mod_timer(struct timer_list *timer
> 
>         BUG_ON(!timer->function);
> 
> +restart:
>         base = lock_timer_base(timer, &flags);
> 
>         if (timer_pending(timer)) {

Another problem. __mode_timer() does:

	if (timer_pending(timer)) {
		detach_timer(timer, 0);

Note that 'clear_pending' parameter == 0. This means that detach_timer()
will remove the timer from list, but won't clear 'pending' status. So
this will crash after 'goto restart' (or in case of concurrent del_timer()).

Oleg.

  parent reply	other threads:[~2005-11-30 10:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-29 12:57 Oleg Nesterov
2005-11-29 12:17 ` Roman Zippel
2005-11-30  2:32 ` Roman Zippel
2005-11-30  9:59   ` Oleg Nesterov
2005-11-30 15:07     ` Roman Zippel
2005-11-30 18:17       ` Oleg Nesterov
2005-11-30 11:23   ` Oleg Nesterov [this message]
2005-11-30 11:06     ` Roman Zippel
  -- strict thread matches above, loose matches on Subject: below --
2005-11-29  1:34 Roman Zippel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=438D8BC0.1993824F@tv-sign.ru \
    --to=oleg@tv-sign.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zippel@linux-m68k.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®