diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2010-11-16 14:22:43 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-11-16 14:22:43 -0500 |
commit | 0281b490dd7b96990724f4a15842c55657699aed (patch) | |
tree | a5565f6c192c01f5fb019052055da9b1af41c99d | |
parent | cc9ca9dfddda46b1802d325891a69d7efdbe1f1e (diff) |
Staging: zram: fix up some sysfs attribute permissions
They should not be writable by any user
Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Nitin Gupta <ngupta@vflare.org>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/staging/zram/zram_sysfs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/zram/zram_sysfs.c b/drivers/staging/zram/zram_sysfs.c index 6c574a994d11..c9b52b941d68 100644 --- a/drivers/staging/zram/zram_sysfs.c +++ b/drivers/staging/zram/zram_sysfs.c | |||
@@ -189,10 +189,10 @@ static ssize_t mem_used_total_show(struct device *dev, | |||
189 | return sprintf(buf, "%llu\n", val); | 189 | return sprintf(buf, "%llu\n", val); |
190 | } | 190 | } |
191 | 191 | ||
192 | static DEVICE_ATTR(disksize, S_IRUGO | S_IWUGO, | 192 | static DEVICE_ATTR(disksize, S_IRUGO | S_IRUSR, |
193 | disksize_show, disksize_store); | 193 | disksize_show, disksize_store); |
194 | static DEVICE_ATTR(initstate, S_IRUGO, initstate_show, NULL); | 194 | static DEVICE_ATTR(initstate, S_IRUGO, initstate_show, NULL); |
195 | static DEVICE_ATTR(reset, S_IWUGO, NULL, reset_store); | 195 | static DEVICE_ATTR(reset, S_IRUSR, NULL, reset_store); |
196 | static DEVICE_ATTR(num_reads, S_IRUGO, num_reads_show, NULL); | 196 | static DEVICE_ATTR(num_reads, S_IRUGO, num_reads_show, NULL); |
197 | static DEVICE_ATTR(num_writes, S_IRUGO, num_writes_show, NULL); | 197 | static DEVICE_ATTR(num_writes, S_IRUGO, num_writes_show, NULL); |
198 | static DEVICE_ATTR(invalid_io, S_IRUGO, invalid_io_show, NULL); | 198 | static DEVICE_ATTR(invalid_io, S_IRUGO, invalid_io_show, NULL); |