]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
mfd: ab3100: world-writable debugfs *_priv files
authorVasiliy Kulikov <segoon@openwall.com>
Fri, 4 Feb 2011 12:23:36 +0000 (15:23 +0300)
committerSamuel Ortiz <sameo@linux.intel.com>
Wed, 23 Mar 2011 09:41:47 +0000 (10:41 +0100)
Don't allow everybody to change device hardware registers.

Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/mfd/ab3100-core.c

index 4193af5f2743904238962f440483eca992d20680..1707d224232d1076c34f0f8e2e6513e8a01234d9 100644 (file)
@@ -613,7 +613,7 @@ static void ab3100_setup_debugfs(struct ab3100 *ab3100)
        ab3100_get_priv.ab3100 = ab3100;
        ab3100_get_priv.mode = false;
        ab3100_get_reg_file = debugfs_create_file("get_reg",
-                               S_IWUGO, ab3100_dir, &ab3100_get_priv,
+                               S_IWUSR, ab3100_dir, &ab3100_get_priv,
                                &ab3100_get_set_reg_fops);
        if (!ab3100_get_reg_file) {
                err = -ENOMEM;
@@ -623,7 +623,7 @@ static void ab3100_setup_debugfs(struct ab3100 *ab3100)
        ab3100_set_priv.ab3100 = ab3100;
        ab3100_set_priv.mode = true;
        ab3100_set_reg_file = debugfs_create_file("set_reg",
-                               S_IWUGO, ab3100_dir, &ab3100_set_priv,
+                               S_IWUSR, ab3100_dir, &ab3100_set_priv,
                                &ab3100_get_set_reg_fops);
        if (!ab3100_set_reg_file) {
                err = -ENOMEM;