Re: [patch 05/15] Generic Mutex Subsystem, mutex-core.patch




* Oleg Nesterov <oleg@xxxxxxxxxx> wrote:

> > +start_mutex_timer(struct timer_list *timer, unsigned long time,
> > + unsigned long *expire)
> > +{
> > + *expire = time + jiffies;
> > + init_timer(timer);
> > + timer->expires = *expire;
> > + timer->data = (unsigned long)current;
> > + timer->function = process_timeout;
> > + add_timer(timer);
> > +}
>
> How about
> setup_timer(&timer, process_timeout, (unsigned long)current);
> __mod_timer(&timer, *expire);
> ?

i've removed the timer code from the latest queue - because it's unused
and we can add it back later. But you are right, it was racy (Arjan
noticed the signal race too), because this codepath in -rt relied on
guaranteed lock-passing. (while mutex.c does a trylock)

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



Relevant Pages

  • Re: 2.6.21-rc2-mm2: drivers/net/wireless/libertas/debugfs.c addr bogosity
    ... I'll queue it up shortly. ... Adrian Bunk wrote: ... More majordomo info at http://vger.kernel.org/majordomo-info.html ... Please read the FAQ at http://www.tux.org/lkml/ ...
    (Linux-Kernel)
  • Re: [PATCH] smbfs chroot issue (CVE-2006-1864)
    ... This patch also applies to 2.4, did you receive it on your side or do you ... want me to queue it in -upstream? ... More majordomo info at http://vger.kernel.org/majordomo-info.html ... Please read the FAQ at http://www.tux.org/lkml/ ...
    (Linux-Kernel)
  • Re: NIU - Sun Neptune 10g - Transmit timed out reset (2.6.24)
    ... Empty" interrupt by not relying on the TX interrupt at all. ... In such a case we could batch the TX queue refill, ... More majordomo info at http://vger.kernel.org/majordomo-info.html ... Please read the FAQ at http://www.tux.org/lkml/ ...
    (Linux-Kernel)
  • [patch 03/22] pollfs: asynchronously wait for a signal
    ... Add a wait queue to the task_struct in order to be able to ... associate a signal with other resources. ... More majordomo info at http://vger.kernel.org/majordomo-info.html ... Please read the FAQ at http://www.tux.org/lkml/ ...
    (Linux-Kernel)
  • Re: [PATCH] LED: add LED heartbeat trigger
    ... replacement of CONFIG_HEARTBEAT code exists in some arch's timer code. ... More majordomo info at http://vger.kernel.org/majordomo-info.html ... Please read the FAQ at http://www.tux.org/lkml/ ...
    (Linux-Kernel)