aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/cpu.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2007-07-31 03:38:16 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-31 18:39:39 -0400
commit9eb3ff40376e505eafb927b4a4cbccc928df68ec (patch)
tree86566782602f9012935c2de195f970f878b94401 /drivers/base/cpu.c
parent07a304603cd0133468e3a153f4fe78b02733d0db (diff)
CPU online file permission
Is there a reason why the "online" file in the subdirectories for the CPUs in /sys/devices/system isn't world-readable? I cannot imagine it to be security relevant especially now that a getcpu() syscall can be used to determine what CPUa thread runs on. The file is useful to correctly implement the sysconf() function to return the number of online CPUs. In the presence of hotplug we currently cannot provide this information. The patch below should to it. Signed-off-by: Ulrich Drepper <drepper@redhat.com> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/base/cpu.c')
-rw-r--r--drivers/base/cpu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c
index fe7ef3394144..40545071e3c9 100644
--- a/drivers/base/cpu.c
+++ b/drivers/base/cpu.c
@@ -53,7 +53,7 @@ static ssize_t store_online(struct sys_device *dev, const char *buf,
53 ret = count; 53 ret = count;
54 return ret; 54 return ret;
55} 55}
56static SYSDEV_ATTR(online, 0600, show_online, store_online); 56static SYSDEV_ATTR(online, 0644, show_online, store_online);
57 57
58static void __devinit register_cpu_control(struct cpu *cpu) 58static void __devinit register_cpu_control(struct cpu *cpu)
59{ 59{