omap_overclocking: drop global write permissions
authorGrazvydas Ignotas <notasas@gmail.com>
Sat, 24 Mar 2012 15:40:27 +0000 (17:40 +0200)
committerGrazvydas Ignotas <notasas@gmail.com>
Tue, 3 Apr 2012 21:00:38 +0000 (00:00 +0300)
programs have no business writing to these files, wrapper scripts must
be used through sudo. This is because cpufreq needs to be poked for
cpu_mhz_max and display must be disabled when writing to sys_mhz_max,
othwise the system may crash.

drivers/misc/omap_overclocking.c

index c641427..129241d 100644 (file)
@@ -310,10 +310,10 @@ static void proc_create_rw(const char *name, void *pdata,
 {
        struct proc_dir_entry *pret;
 
-       pret = create_proc_entry(name, S_IWUGO | S_IRUGO, NULL);
+       pret = create_proc_entry(name, S_IWUSR | S_IRUGO, NULL);
        if (pret == NULL) {
                proc_mkdir(PROC_DIR, NULL);
-               pret = create_proc_entry(name, S_IWUGO | S_IRUGO, NULL);
+               pret = create_proc_entry(name, S_IWUSR | S_IRUGO, NULL);
                if (pret == NULL) {
                        pr_err("%s: failed to create proc file %s\n",
                                __func__, name);