From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-dm3nam03on0137.outbound.protection.outlook.com ([104.47.41.137]:59840 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752935AbeDCD1o (ORCPT ); Mon, 2 Apr 2018 23:27:44 -0400 From: Sasha Levin To: David Lechner CC: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" , Stephen Boyd Subject: Re: [PATCH AUTOSEL for 4.15 104/124] clk: fix reentrancy of clk_enable() on UP systems Date: Tue, 3 Apr 2018 03:27:41 +0000 Message-ID: <20180403032740.GL7561@sasha-vm> References: <20180319154645.11350-1-alexander.levin@microsoft.com> <20180319154645.11350-104-alexander.levin@microsoft.com> <6a944b80-c86c-ca23-5ada-f088d84c9a80@lechnology.com> In-Reply-To: <6a944b80-c86c-ca23-5ada-f088d84c9a80@lechnology.com> Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org List-ID: On Mon, Mar 19, 2018 at 10:55:16AM -0500, David Lechner wrote: >On 03/19/2018 10:48 AM, Sasha Levin wrote: >>From: David Lechner >> >>[ Upstream commit a12aa8a68dfef5de181f2e555aa950a0ab05411f ] >> >>Reentrant calls to clk_enable() are not working on UP systems. This is >>caused by the fact spin_trylock_irqsave() always returns true when >>CONFIG_SMP=3Dn (and CONFIG_DEBUG_SPINLOCK=3Dn) which causes the reference >>counting to not work correctly when clk_enable_lock() is called twice >>before clk_enable_unlock() is called (this happens when clk_enable() >>is called from within another clk_enable()). >> >>This fixes the problem by skipping the call to spin_trylock_irqsave() on = UP >>systems and relying solely on reference counting. We also make sure to se= t >>flags in this case so that we are not returning an uninitialized value. >> >>Suggested-by: Stephen Boyd >>Signed-off-by: David Lechner >>Signed-off-by: Stephen Boyd >>Signed-off-by: Sasha Levin >>--- > >I don't know of any existing bugs in v4.15 that this fixes, so I don't >think this really fits the criteria for stable. > Now removed, thanks!=