Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755973AbdGLKDA (ORCPT ); Wed, 12 Jul 2017 06:03:00 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:43438 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754997AbdGLKC6 (ORCPT ); Wed, 12 Jul 2017 06:02:58 -0400 Date: Wed, 12 Jul 2017 11:02:50 +0100 From: Mark Brown To: Tirupathi Reddy Cc: lgirdwood@gmail.com, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Message-ID: <20170712100250.kjbedwzdfuiq7ycs@sirena.org.uk> References: <1499851787-31016-1-git-send-email-tirupath@codeaurora.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="nalihr5m4mbcci6x" Content-Disposition: inline In-Reply-To: <1499851787-31016-1-git-send-email-tirupath@codeaurora.org> X-Cookie: All is fear in love and war. User-Agent: NeoMutt/20170609 (1.8.3) X-SA-Exim-Connect-IP: 2001:470:1f1d:6b5::3 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: [PATCH 1/1] regulator: core: fix a possible race in disable_work handling X-SA-Exim-Version: 4.2.1 (built Tue, 02 Aug 2016 21:08:31 +0000) X-SA-Exim-Scanned: No (on mezzanine.sirena.org.uk); Unknown failure Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1132 Lines: 32 --nalihr5m4mbcci6x Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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... --nalihr5m4mbcci6x Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAlll88YACgkQJNaLcl1U h9AZIwf/feLSR6z+L/gpUaAPVFS62/LglHdKeEGXwNQAmCXqtKWqroqF4lsOFn1q xpOc4b1ggNHRp4JM19iRoMx/WXqL3+t/hcp5lk+dwttS9RTF+T03EOdmdDsDVA16 JcR4oby1Aeid0KpMO0lMynQ2ZuGQBmjKixXBoIDcCpOghCyV3m5sQzHlP0gGFgoz b8UMjlOOFk3ERQaNwhUdukwMClUJZWMQFkQct0SCPg82sUpwk/AW8Lr1IiEu8UNv 7qy4ZnWC4DJRHOclpXniYQZMdHa8sBCuGOwMJnIAmtazRUBSen5pjfMaQBZDGQPo CgJlfM6bSijJtDkcJ7HUe1wHpNJqAA== =k+dG -----END PGP SIGNATURE----- --nalihr5m4mbcci6x--