From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Cox Date: Mon, 20 Dec 2004 14:59:09 +0000 Subject: [KJ] Re: [PATCH] pcxx: replace cli()/sti() with Message-Id: <1103554747.30268.24.camel@localhost.localdomain> MIME-Version: 1 Content-Type: multipart/mixed; boundary="===============0075858195198335032==" List-Id: References: <20041217223426.11143.44338.87156@localhost.localdomain> In-Reply-To: <20041217223426.11143.44338.87156@localhost.localdomain> To: James Nelson Cc: kernel-janitors@lists.osdl.org, Linux Kernel Mailing List , akpm@osdl.org --===============0075858195198335032== Content-Type: text/plain Content-Transfer-Encoding: 7bit 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. --===============0075858195198335032== 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 --===============0075858195198335032==-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261548AbULTQFL (ORCPT ); Mon, 20 Dec 2004 11:05:11 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261558AbULTQFK (ORCPT ); Mon, 20 Dec 2004 11:05:10 -0500 Received: from clock-tower.bc.nu ([81.2.110.250]:31725 "EHLO localhost.localdomain") by vger.kernel.org with ESMTP id S261548AbULTQFE (ORCPT ); Mon, 20 Dec 2004 11:05:04 -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: <20041217223426.11143.44338.87156@localhost.localdomain> References: <20041217223426.11143.44338.87156@localhost.localdomain> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1103554747.30268.24.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Mon, 20 Dec 2004 14:59:09 +0000 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org 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.