Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761185Ab3DBJa7 (ORCPT ); Tue, 2 Apr 2013 05:30:59 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:43686 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760410Ab3DBJaz (ORCPT ); Tue, 2 Apr 2013 05:30:55 -0400 X-AuditID: cbfee68e-b7f946d000001e37-da-515aa542f11f From: Jonghwan Choi To: linux-kernel@vger.kernel.org Cc: stable@vger.kernel.org, "'Liam Girdwood'" , "'Mark Brown'" , "'Russ Dill'" Subject: [PATCH 3.8-stable] regulator: core: Log when a device causes a voltage Date: Tue, 02 Apr 2013 18:30:42 +0900 Message-id: <009001ce2f84$beb22ea0$3c168be0$%choi@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-index: Ac4vhL6OHdYi6A9aR4m9yzeDEXJPog== Content-language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrOIsWRmVeSWpSXmKPExsVy+t8zQ12npVGBBi+b9S3+zT7FZnF51xw2 i6btE9gtpl4/ymSxYOMjRgdWj5cTf7N5HL+xncnj8ya5AOYoLpuU1JzMstQifbsErozWqaeY C15wV9w994G9gfE1ZxcjJ4eEgInE1huNLBC2mMSFe+vZuhi5OIQEljFKXFz9jh2m6NHM/8wQ iUWMEm/6z7NDOH8ZJb7dnsgMUsUmoCtxbP0WVhBbREBBYnPvM1aQImaBCYwSH7a9BSsSFvCX WHByESOIzSKgKnHrSycbiM0rYCdx53QnI4QtKPFj8j2wm5gFtCTW7zzOBGHLS2xeAzKHA+gk dYlHf3UhdulJzHw5FapERGLfi3eMIHslBLaxS3zd9YYNYpeAxLfJh1ggemUlNh1ghvhMUuLg ihssExjFZiHZPAvJ5llINs9CsmIBI8sqRtHUguSC4qT0IiO94sTc4tK8dL3k/NxNjJBI69vB ePOA9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ubjbKPuS0 2sPTKs2JI1/sLP8E3dv6ZvMctov6iHxYw+60/e6zpLctzSkKVzfOrw7q46m2TE90PrzDg1lJ iaU4I9FQi7moOBEAtT+eJCcDAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1709 Lines: 53 3.8-stable review patch. If anyone has any objections, please let us know. ------------------ From: "Russ Dill " commit 6e45eb12fd1c741d556bf264ee98853b5f3104e5 upstream. commit dd8004af: 'regulator: core: Log when a device causes a voltage constraint fail', tried to print out some information about the check consumer min/max uV fixup, however, it uses a garbage pointer left over from list_for_each_entry leading to boot messages in the form: '[ 2.079890] : Restricting voltage, 3735899821-4294967295uV' Because it references regulator->dev, it could potentially read memory from anywhere causing a panic. This patch instead uses rdev and the updated min/max uV values. Signed-off-by: Russ Dill Signed-off-by: Mark Brown Signed-off-by: Jonghwan Choi --- drivers/regulator/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 2785843..5a0f54a 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -200,8 +200,8 @@ static int regulator_check_consumers(struct regulator_dev *rdev, } if (*min_uV > *max_uV) { - dev_err(regulator->dev, "Restricting voltage, %u-%uuV\n", - regulator->min_uV, regulator->max_uV); + rdev_err(rdev, "Restricting voltage, %u-%uuV\n", + *min_uV, *max_uV); return -EINVAL; } -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/