]> git.karo-electronics.de Git - karo-tx-linux.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)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Wed, 14 Mar 2012 14:57:03 +0000 (10:57 -0400)
commit f8a0697722d12a201588225999cfc8bfcbc82781 upstream.

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>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
drivers/mfd/ab3100-core.c

index e4ca5909e4242261ac9a2588954607ec129f18d4..4267a4def53b8024dc5c10fdfd3a77400d2e77c1 100644 (file)
@@ -580,7 +580,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;
@@ -590,7 +590,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;