Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+2 -2
+2 -2
drivers/staging/zram/zram_sysfs.c
··· 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);