[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1314964198.2573.17.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC>
Date: Fri, 02 Sep 2011 13:49:58 +0200
From: Eric Dumazet <eric.dumazet@...il.com>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: Andi Kleen <andi@...stfloor.org>,
LKML <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Andi Kleen <ak@...ux.intel.com>,
Oleg Nesterov <oleg@...hat.com>
Subject: Re: [PATCH 4/4] posix-timers: turn it_signal into it_valid flag
Le vendredi 02 septembre 2011 à 12:06 +0200, Thomas Gleixner a écrit :
> ------------------>
> Subject: posix-timers: Simplify deletion protection
> From: Thomas Gleixner <tglx@...utronix.de>
> Date: Fri, 02 Sep 2011 11:59:14 +0200
>
> k_itimer->it_signal is soleley used to protect a timer lookup against
> a concurrent deletion. We can use k_itimer->list for the same purpose.
>
Well, this patch is wrong too, unless you base it after Andi patch 1/4
(move global timer id management to signal_struct)
The test is also present to make sure one process doesnt try to use a
timer_id of another process.
> @@ -643,7 +643,7 @@ static struct k_itimer *__lock_timer(tim
> timr = idr_find(&posix_timers_id, (int)timer_id);
> if (timr) {
> spin_lock_irqsave(&timr->it_lock, *flags);
> - if (timr->it_signal == current->signal) {
> + if (!list_empty(&timr->list)) {
> rcu_read_unlock();
> return timr;
> }
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists