Commit a3d13107012ea614184d3c58bb7b579905d5da11
1 parent
926c11151e
Exists in
master
and in
7 other branches
Staging: zram: fix up my fixup for some sysfs attribute permissions
They should be writable by root, not readable. Doh, stupid me with the wrong flags. Reported-by: Jonathan Cameron <jic23@cam.ac.uk> 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>
Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff
drivers/staging/zram/zram_sysfs.c
... | ... | @@ -189,10 +189,10 @@ |
189 | 189 | return sprintf(buf, "%llu\n", val); |
190 | 190 | } |
191 | 191 | |
192 | -static DEVICE_ATTR(disksize, S_IRUGO | S_IRUSR, | |
192 | +static DEVICE_ATTR(disksize, S_IRUGO | S_IWUSR, | |
193 | 193 | disksize_show, disksize_store); |
194 | 194 | static DEVICE_ATTR(initstate, S_IRUGO, initstate_show, NULL); |
195 | -static DEVICE_ATTR(reset, S_IRUSR, NULL, reset_store); | |
195 | +static DEVICE_ATTR(reset, S_IWUSR, NULL, reset_store); | |
196 | 196 | static DEVICE_ATTR(num_reads, S_IRUGO, num_reads_show, NULL); |
197 | 197 | static DEVICE_ATTR(num_writes, S_IRUGO, num_writes_show, NULL); |
198 | 198 | static DEVICE_ATTR(invalid_io, S_IRUGO, invalid_io_show, NULL); |