lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1426625966-22187-1-git-send-email-dramasub@codeaurora.org>
Date:	Tue, 17 Mar 2015 13:59:26 -0700
From:	Deva Ramasubramanian <dramasub@...eaurora.org>
To:	MyungJoo Ham <myungjoo.ham@...sung.com>,
	Kyungmin Park <kyungmin.park@...sung.com>
Cc:	Deva Ramasubramanian <dramasub@...eaurora.org>,
	linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] PM / devfreq: Fix faulty error message

The misleading log "releasing devfreq which doesn't exist" prints out
for well behaved clients.  This is due to the fact that _remove_devfreq
calls itself recursively by proxy (via put_device()).  The second time
_devfreq_remove is called the respective device has already been
deleted, causing the misleading warning.

So just skip printing the message if _devfreq_remove was called via
put_device().

Signed-off-by: Deva Ramasubramanian <dramasub@...eaurora.org>
---
 drivers/devfreq/devfreq.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
index 30b538d8..bee59db 100644
--- a/drivers/devfreq/devfreq.c
+++ b/drivers/devfreq/devfreq.c
@@ -399,7 +399,8 @@ static void _remove_devfreq(struct devfreq *devfreq)
 	mutex_lock(&devfreq_list_lock);
 	if (IS_ERR(find_device_devfreq(devfreq->dev.parent))) {
 		mutex_unlock(&devfreq_list_lock);
-		dev_warn(&devfreq->dev, "releasing devfreq which doesn't exist\n");
+		if (!skip)
+			dev_warn(&devfreq->dev, "releasing devfreq which doesn't exist\n");
 		return;
 	}
 	list_del(&devfreq->node);
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ