Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S272421AbTGaGxW (ORCPT ); Thu, 31 Jul 2003 02:53:22 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S272419AbTGaGxV (ORCPT ); Thu, 31 Jul 2003 02:53:21 -0400 Received: from mx1.elte.hu ([157.181.1.137]:26272 "EHLO mx1.elte.hu") by vger.kernel.org with ESMTP id S272421AbTGaGxU (ORCPT ); Thu, 31 Jul 2003 02:53:20 -0400 Date: Thu, 31 Jul 2003 08:50:46 +0200 (CEST) From: Ingo Molnar Reply-To: Ingo Molnar To: linas@austin.ibm.com Cc: Andrew Morton , Subject: Re: PATCH: Race in 2.6.0-test2 timer code In-Reply-To: <20030730150539.A28284@forte.austin.ibm.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 754 Lines: 27 On Wed, 30 Jul 2003 linas@austin.ibm.com wrote: > cpu 1 cpu 2 > -------- --------- > mod_timer() { > > old_base = timer->base; > if (old_base && ) { /* not taken */ > } > else > . spin_lock(&cpu2_base->lock); this race is not possible on 2.6. You are forgetting: spin_lock_irqsave(&timer->lock, flags); which serializes the full mod_timer() operation. Ok? Ingo - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/