From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Cox Date: Mon, 20 Dec 2004 20:23:50 +0000 Subject: [KJ] Re: [PATCH] pcxx: replace cli()/sti() with Message-Id: <1103574222.31479.12.camel@localhost.localdomain> MIME-Version: 1 Content-Type: multipart/mixed; boundary="===============8642196549425214==" List-Id: References: <20041217223426.11143.44338.87156@localhost.localdomain> <1103554747.30268.24.camel@localhost.localdomain> In-Reply-To: <1103554747.30268.24.camel@localhost.localdomain> To: James Nelson Cc: kernel-janitors@lists.osdl.org, Linux Kernel Mailing List , akpm@osdl.org --===============8642196549425214== Content-Type: text/plain Content-Transfer-Encoding: 7bit On Llu, 2004-12-20 at 14:59, Alan Cox wrote: > On Gwe, 2004-12-17 at 22:34, James Nelson wrote: > > - save_flags(flags); > > - cli(); > > + spin_lock_irqsave(&pcxx_lock, flags); > > del_timer_sync(&pcxx_timer); > > Not safe if the lock is grabbed by the timer between the lock and the > irqsave as it will spin on another cpu and the timer delete will never > finish. Error between brain and keyboard Between the lock and the timer_delete of course --===============8642196549425214== Content-Type: text/plain; charset="iso-8859-1" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline _______________________________________________ Kernel-janitors mailing list Kernel-janitors@lists.osdl.org http://lists.osdl.org/mailman/listinfo/kernel-janitors --===============8642196549425214==-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261649AbULTV34 (ORCPT ); Mon, 20 Dec 2004 16:29:56 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261647AbULTV3z (ORCPT ); Mon, 20 Dec 2004 16:29:55 -0500 Received: from clock-tower.bc.nu ([81.2.110.250]:13698 "EHLO localhost.localdomain") by vger.kernel.org with ESMTP id S261649AbULTV3k (ORCPT ); Mon, 20 Dec 2004 16:29:40 -0500 Subject: Re: [PATCH] pcxx: replace cli()/sti() with spin_lock_irqsave()/spin_unlock_irqrestore() From: Alan Cox To: James Nelson Cc: kernel-janitors@lists.osdl.org, Linux Kernel Mailing List , akpm@osdl.org In-Reply-To: <1103554747.30268.24.camel@localhost.localdomain> References: <20041217223426.11143.44338.87156@localhost.localdomain> <1103554747.30268.24.camel@localhost.localdomain> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1103574222.31479.12.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Mon, 20 Dec 2004 20:23:50 +0000 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Llu, 2004-12-20 at 14:59, Alan Cox wrote: > On Gwe, 2004-12-17 at 22:34, James Nelson wrote: > > - save_flags(flags); > > - cli(); > > + spin_lock_irqsave(&pcxx_lock, flags); > > del_timer_sync(&pcxx_timer); > > Not safe if the lock is grabbed by the timer between the lock and the > irqsave as it will spin on another cpu and the timer delete will never > finish. Error between brain and keyboard Between the lock and the timer_delete of course