From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tony Lindgren Subject: Re: [PATCHv6 01/11] ARM: OMAP: clockdomain: Fix locking on _clkdm_clk_hwmod_enable / disable Date: Tue, 16 Oct 2012 19:41:10 -0700 Message-ID: <20121017024109.GR15569@atomide.com> References: <1348589142-11983-1-git-send-email-t-kristo@ti.com> <1348589142-11983-2-git-send-email-t-kristo@ti.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mho-03-ewr.mailhop.org ([204.13.248.66]:61329 "EHLO mho-01-ewr.mailhop.org" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754191Ab2JQClO (ORCPT ); Tue, 16 Oct 2012 22:41:14 -0400 Content-Disposition: inline In-Reply-To: Sender: linux-omap-owner@vger.kernel.org List-Id: linux-omap@vger.kernel.org To: Paul Walmsley Cc: Tero Kristo , linux-omap@vger.kernel.org, khilman@ti.com, linux-arm-kernel@lists.infradead.org * Paul Walmsley [121016 19:26]: > On Tue, 25 Sep 2012, Tero Kristo wrote: > > > Previously the code only acquired spinlock after increasing / decreasing > > the usecount value, which is wrong. This leaves a small window where > > a task switch may occur between the check of the usecount and the actual > > wakeup / sleep of the domain. Fixed by moving the spinlock locking before > > the usecount access. Left the usecount as atomic_t if someone wants an > > easy access to the parameter through atomic_read. > > > > Signed-off-by: Tero Kristo > > Acked-by: Paul Walmsley OK I'll apply this into omap-for-v3.7-rc1/fixes-take4. Regards, Tony From mboxrd@z Thu Jan 1 00:00:00 1970 From: tony@atomide.com (Tony Lindgren) Date: Tue, 16 Oct 2012 19:41:10 -0700 Subject: [PATCHv6 01/11] ARM: OMAP: clockdomain: Fix locking on _clkdm_clk_hwmod_enable / disable In-Reply-To: References: <1348589142-11983-1-git-send-email-t-kristo@ti.com> <1348589142-11983-2-git-send-email-t-kristo@ti.com> Message-ID: <20121017024109.GR15569@atomide.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org * Paul Walmsley [121016 19:26]: > On Tue, 25 Sep 2012, Tero Kristo wrote: > > > Previously the code only acquired spinlock after increasing / decreasing > > the usecount value, which is wrong. This leaves a small window where > > a task switch may occur between the check of the usecount and the actual > > wakeup / sleep of the domain. Fixed by moving the spinlock locking before > > the usecount access. Left the usecount as atomic_t if someone wants an > > easy access to the parameter through atomic_read. > > > > Signed-off-by: Tero Kristo > > Acked-by: Paul Walmsley OK I'll apply this into omap-for-v3.7-rc1/fixes-take4. Regards, Tony