From: Tirupathi Reddy T Subject: Re: [PATCH 1/1] regulator: core: fix a possible race in disable_work handling Date: Wed, 12 Jul 2017 17:16:05 +0530 Message-ID: <5b4da9ca-b641-7723-5d96-af6e5f481454@codeaurora.org> References: <1499851787-31016-1-git-send-email-tirupath@codeaurora.org> <20170712100250.kjbedwzdfuiq7ycs@sirena.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from smtp.codeaurora.org ([198.145.29.96]:52248 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756677AbdGLLqL (ORCPT ); Wed, 12 Jul 2017 07:46:11 -0400 In-Reply-To: <20170712100250.kjbedwzdfuiq7ycs@sirena.org.uk> Content-Language: en-US Sender: linux-arm-msm-owner@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org To: Mark Brown Cc: lgirdwood@gmail.com, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org On 7/12/2017 3:32 PM, Mark Brown wrote: > On Wed, Jul 12, 2017 at 02:59:47PM +0530, Tirupathi Reddy wrote: > >> regulator_disable_deferred: regulator_disable_work: >> mutex_lock(&rdev->mutex); ..... >> rdev->deferred_disables++; mutex_lock(&rdev->mutex); >> mutex_unlock(&rdev->mutex); ..... >> queue_delayed_work(...) count =rdev->deferred_disables; >> ..... rdev->deferred_disables = 0; > This shows two things simultaneously holding rdev->mutex... Fixed this in the new patch version(V2). https://patchwork.kernel.org/patch/9836529/