[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1184691746.12353.450.camel@chaos>
Date: Tue, 17 Jul 2007 19:02:26 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: Oleg Nesterov <oleg@...sign.ru>
Cc: Jeremy Katz <jeremy.katz@...driver.com>,
linux-kernel@...r.kernel.org, Andrew Morton <akpm@...l.org>,
Ingo Molnar <mingo@...e.hu>, Stable Team <stable@...nel.org>
Subject: Re: [PATCH] posix-timer: fix deletion race
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@...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