projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bfaf4af
)
locking/rtmutex/tester: Set correct permissions on sysfs files
author
Sasha Levin
<sasha.levin@oracle.com>
Wed, 20 Mar 2013 15:58:25 +0000
(11:58 -0400)
committer
Ingo Molnar
<mingo@kernel.org>
Wed, 10 Apr 2013 12:48:37 +0000
(14:48 +0200)
sysfs started complaining about cases where permissions don't
match what's in the sysfs ops structure (such as allowing read
without a "show" callback).
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Cc: williams@redhat.com
Link:
http://lkml.kernel.org/r/1363795105-5884-1-git-send-email-sasha.levin@oracle.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/rtmutex-tester.c
patch
|
blob
|
blame
|
history
diff --git
a/kernel/rtmutex-tester.c
b/kernel/rtmutex-tester.c
index 7890b10084a71e4deff2a1ed652c7011358fc3b4..1d96dd0d93c1aa24eaff65f13b9df2cc22945ae2 100644
(file)
--- a/
kernel/rtmutex-tester.c
+++ b/
kernel/rtmutex-tester.c
@@
-14,6
+14,7
@@
#include <linux/spinlock.h>
#include <linux/timer.h>
#include <linux/freezer.h>
+#include <linux/stat.h>
#include "rtmutex.h"
@@
-366,8
+367,8
@@
static ssize_t sysfs_test_status(struct device *dev, struct device_attribute *at
return curr - buf;
}
-static DEVICE_ATTR(status,
0600
, sysfs_test_status, NULL);
-static DEVICE_ATTR(command,
0600
, NULL, sysfs_test_command);
+static DEVICE_ATTR(status,
S_IRUSR
, sysfs_test_status, NULL);
+static DEVICE_ATTR(command,
S_IWUSR
, NULL, sysfs_test_command);
static struct bus_type rttest_subsys = {
.name = "rttest",