From patchwork Fri Apr 29 00:43:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 66935 Delivered-To: patches@linaro.org Received: by 10.140.93.198 with SMTP id d64csp510920qge; Thu, 28 Apr 2016 17:43:47 -0700 (PDT) X-Received: by 10.66.25.112 with SMTP id b16mr24657622pag.154.1461890627625; Thu, 28 Apr 2016 17:43:47 -0700 (PDT) Return-Path: Received: from mail-pf0-x22f.google.com (mail-pf0-x22f.google.com. [2607:f8b0:400e:c00::22f]) by mx.google.com with ESMTPS id i89si3958737pfi.95.2016.04.28.17.43.47 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Apr 2016 17:43:47 -0700 (PDT) Received-SPF: pass (google.com: domain of john.stultz@linaro.org designates 2607:f8b0:400e:c00::22f as permitted sender) client-ip=2607:f8b0:400e:c00::22f; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: domain of john.stultz@linaro.org designates 2607:f8b0:400e:c00::22f as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by mail-pf0-x22f.google.com with SMTP id 77so8137039pfv.2 for ; Thu, 28 Apr 2016 17:43:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=TpCUu0tuKOfjEMhaUV0+FaW8jZ4kqxJzED7QUEnqPqE=; b=XJzEIeMinxGhYDb8apwZWuBELVIEVGWs0I4RxPEPrf+2HmhIdEk48C62SZkPM6MxH1 D9i9tC1D3+1eiIl7SaZjvVaUncWOMAY/44agKVMMtpwMc9k9JzS+AOi70whslXTgXSb9 /sMsY3rMVmX2XdyevS7M5j0I2HMHSIhygrNU0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=TpCUu0tuKOfjEMhaUV0+FaW8jZ4kqxJzED7QUEnqPqE=; b=Q+749p8/mgHqySdNvei0hkUp8iFsmvv9JZ9meR3ZQDn6Cj6meEHK05A+DwHW2DjOxu kQ6/64cFAgq6vVeD4sdWpB+M3+rxjbbNGkvgxU9AITD39olj6Qfo79g/57fJlxgSDJio GW1GAfGoqaxeesFv4XvdMtY5GTgMyOvYpcSRUkG5O426BWSnK4c7q+CH1HA9AFZLtIHv BzSc9TZzre2C1aSAbT2kEvDlxxKGfd/i29/fuhpH3EGXFqKRguKbuwCT95nd1dtK+zFx 9VVuDJ8FQg7+NpI0o9gEUlnXjHOcdGDlVeQgaNA7EPznWr68P3hMXfMtz4PotU6hhgmz SU/w== X-Gm-Message-State: AOPr4FWJ0euWxF+yUL5gfohzt7+5lB90b5NDMrTbxoKTvb0o2h5Cdomks2FFzFhtuJzG4urzGbk= X-Received: by 10.98.17.153 with SMTP id 25mr20401973pfr.105.1461890627146; Thu, 28 Apr 2016 17:43:47 -0700 (PDT) Return-Path: Received: from localhost.localdomain (c-73-67-244-238.hsd1.or.comcast.net. [73.67.244.238]) by smtp.gmail.com with ESMTPSA id i1sm18123148pfj.17.2016.04.28.17.43.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 28 Apr 2016 17:43:46 -0700 (PDT) From: John Stultz To: lkml Cc: John Stultz , Mark Brown , Tyler Baker , Thierry Reding , Greg Kroah-Hartman , stable Subject: [RFC][PATCH 4.4-stable] regulator: core: Ensure we lock all regulators Date: Thu, 28 Apr 2016 17:43:37 -0700 Message-Id: <1461890617-29209-1-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.9.1 It seems upstream commit 49a6bb7a1c09 ("regulator: core: Ensure we lock all regulators"), was missed when considering tagging for -stable. Without this varient of that patch (the original doesn't apply, due to a later fix to the same which was backported), I see double-unlock lockdep splats in the v4.4.8 based HiKey kernel. Cc: Mark Brown Cc: Tyler Baker Cc: Thierry Reding Cc: Greg Kroah-Hartman CC: stable # 4.4 only (I think) Fixes: 3c2c5fb9b99ca ("regulator: core: avoid unused variable warning") Originally-Reported-by: Tyler Baker Originally-by: Mark Brown Signed-off-by: John Stultz --- drivers/regulator/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 1.9.1 diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 7b94b8e..732ac71 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -148,7 +148,7 @@ static void regulator_lock_supply(struct regulator_dev *rdev) { int i; - for (i = 0; rdev->supply; rdev = rdev_get_supply(rdev), i++) + for (i = 0; rdev; rdev = rdev_get_supply(rdev), i++) mutex_lock_nested(&rdev->mutex, i); }