All of lore.kernel.org
 help / color / mirror / Atom feed
* [2.6.38-rc7, patch] cpuinfo_cur_freq unreadable by non-root
@ 2011-03-02  5:52 Daniel J Blueman
  2011-03-02  9:27 ` Thomas Renninger
       [not found] ` <201103020959.31337.trenn@suse.de>
  0 siblings, 2 replies; 4+ messages in thread
From: Daniel J Blueman @ 2011-03-02  5:52 UTC (permalink / raw)
  To: cpufreq; +Cc: Dave Jones

I failed to find why
/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq is only readable
by root; the cost of reading it isn't sufficient to cause memory or
scheduling denial, but may have been in the past.

Thus, allow non-root users read permission, consistent with other
attributes, allowing it to be monitored.

Signed-off-by: Daniel J Blueman <daniel.blueman@gmail.com>

diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 1109f68..0f491fe 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -664,7 +664,7 @@ static ssize_t show_bios_limit(struct
cpufreq_policy *policy, char *buf)
 	return sprintf(buf, "%u\n", policy->cpuinfo.max_freq);
 }

-cpufreq_freq_attr_ro_perm(cpuinfo_cur_freq, 0400);
+cpufreq_freq_attr_ro(cpuinfo_cur_freq);
 cpufreq_freq_attr_ro(cpuinfo_min_freq);
 cpufreq_freq_attr_ro(cpuinfo_max_freq);
 cpufreq_freq_attr_ro(cpuinfo_transition_latency);
-- 
Daniel J Blueman

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-03-02 10:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-02  5:52 [2.6.38-rc7, patch] cpuinfo_cur_freq unreadable by non-root Daniel J Blueman
2011-03-02  9:27 ` Thomas Renninger
2011-03-02 10:30   ` Dominik Brodowski
     [not found] ` <201103020959.31337.trenn@suse.de>
2011-03-02  9:33   ` [2.6.38-rc7, patch v2] " Daniel J Blueman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.