]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
.36 patches
authorGreg Kroah-Hartman <gregkh@suse.de>
Mon, 6 Dec 2010 23:13:55 +0000 (15:13 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 6 Dec 2010 23:13:55 +0000 (15:13 -0800)
queue-2.6.36/revert-vfs-show-unreachable-paths-in-getcwd-and-proc.patch [new file with mode: 0644]
queue-2.6.36/series
queue-2.6.36/staging-batman-adv-ensure-that-eth_type_trans-gets-linear-memory.patch [new file with mode: 0644]
queue-2.6.36/staging-frontier-fix-up-some-sysfs-attribute-permissions.patch [new file with mode: 0644]
queue-2.6.36/staging-iio-adis16220-fix-up-my-fixup-for-some-sysfs-attribute-permissions.patch [new file with mode: 0644]
queue-2.6.36/staging-iio-adis16220-fix-up-some-sysfs-attribute-permissions.patch [new file with mode: 0644]
queue-2.6.36/staging-rtl8187se-change-panic-to-warn-when-rf-switch-turned-off.patch [new file with mode: 0644]
queue-2.6.36/staging-samsung-laptop-fix-up-my-fixup-for-some-sysfs-attribute-permissions.patch [new file with mode: 0644]
queue-2.6.36/staging-samsung-laptop-fix-up-some-sysfs-attribute-permissions.patch [new file with mode: 0644]
queue-2.6.36/staging-udlfb-fix-up-some-sysfs-attribute-permissions.patch [new file with mode: 0644]
queue-2.6.36/staging-zram-fix-up-some-sysfs-attribute-permissions.patch [new file with mode: 0644]

diff --git a/queue-2.6.36/revert-vfs-show-unreachable-paths-in-getcwd-and-proc.patch b/queue-2.6.36/revert-vfs-show-unreachable-paths-in-getcwd-and-proc.patch
new file mode 100644 (file)
index 0000000..b1d6f89
--- /dev/null
@@ -0,0 +1,60 @@
+From 7b2a69ba7055da9a04eb96aa7b38c8e3280aaaa5 Mon Sep 17 00:00:00 2001
+From: Eric W. Biederman <ebiederm@xmission.com>
+Date: Sun, 5 Dec 2010 15:51:21 -0800
+Subject: Revert "vfs: show unreachable paths in getcwd and proc"
+
+From: Eric W. Biederman <ebiederm@xmission.com>
+
+commit 7b2a69ba7055da9a04eb96aa7b38c8e3280aaaa5 upstream.
+
+Because it caused a chroot ttyname regression in 2.6.36.
+
+As of 2.6.36 ttyname does not work in a chroot.  It has already been
+reported that screen breaks, and for me this breaks an automated
+distribution testsuite, that I need to preserve the ability to run the
+existing binaries on for several more years.  glibc 2.11.3 which has a
+fix for this is not an option.
+
+The root cause of this breakage is:
+
+    commit 8df9d1a4142311c084ffeeacb67cd34d190eff74
+    Author: Miklos Szeredi <mszeredi@suse.cz>
+    Date:   Tue Aug 10 11:41:41 2010 +0200
+
+    vfs: show unreachable paths in getcwd and proc
+
+    Prepend "(unreachable)" to path strings if the path is not reachable
+    from the current root.
+
+    Two places updated are
+     - the return string from getcwd()
+     - and symlinks under /proc/$PID.
+
+    Other uses of d_path() are left unchanged (we know that some old
+    software crashes if /proc/mounts is changed).
+
+    Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
+    Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
+
+So remove the nice sounding, but ultimately ill advised change to how
+/proc/fd symlinks work.
+
+Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ fs/proc/base.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/fs/proc/base.c
++++ b/fs/proc/base.c
+@@ -1526,7 +1526,7 @@ static int do_proc_readlink(struct path
+       if (!tmp)
+               return -ENOMEM;
+-      pathname = d_path_with_unreachable(path, tmp, PAGE_SIZE);
++      pathname = d_path(path, tmp, PAGE_SIZE);
+       len = PTR_ERR(pathname);
+       if (IS_ERR(pathname))
+               goto out;
index 65a9f9d254fdc65a804a23471d1a311b6dbb6e5f..2c9a51483c0b3b571bcd1bdac8e10831ef70c7dc 100644 (file)
@@ -245,3 +245,13 @@ arm-6482-2-fix-find_next_zero_bit-and-related-assembly.patch
 leds-fix-bug-with-reading-nas-ss4200-dmi-code.patch
 serial-mfd-adjust-the-baud-rate-setting.patch
 memcg-avoid-deadlock-between-move-charge-and-try_charge.patch
+revert-vfs-show-unreachable-paths-in-getcwd-and-proc.patch
+staging-udlfb-fix-up-some-sysfs-attribute-permissions.patch
+staging-iio-adis16220-fix-up-some-sysfs-attribute-permissions.patch
+staging-iio-adis16220-fix-up-my-fixup-for-some-sysfs-attribute-permissions.patch
+staging-samsung-laptop-fix-up-some-sysfs-attribute-permissions.patch
+staging-samsung-laptop-fix-up-my-fixup-for-some-sysfs-attribute-permissions.patch
+staging-frontier-fix-up-some-sysfs-attribute-permissions.patch
+staging-rtl8187se-change-panic-to-warn-when-rf-switch-turned-off.patch
+staging-batman-adv-ensure-that-eth_type_trans-gets-linear-memory.patch
+staging-zram-fix-up-some-sysfs-attribute-permissions.patch
diff --git a/queue-2.6.36/staging-batman-adv-ensure-that-eth_type_trans-gets-linear-memory.patch b/queue-2.6.36/staging-batman-adv-ensure-that-eth_type_trans-gets-linear-memory.patch
new file mode 100644 (file)
index 0000000..1787294
--- /dev/null
@@ -0,0 +1,42 @@
+From b6faaae1a15a352d68b3e3cd8b840e56709820bf Mon Sep 17 00:00:00 2001
+From: Marek Lindner <lindner_marek@yahoo.de>
+Date: Mon, 22 Nov 2010 12:34:49 +0100
+Subject: Staging: batman-adv: ensure that eth_type_trans gets linear memory
+
+From: Marek Lindner <lindner_marek@yahoo.de>
+
+commit b6faaae1a15a352d68b3e3cd8b840e56709820bf upstream.
+
+eth_type_trans tries to pull data with the length of the ethernet header
+from the skb. We only ensured that enough data for the first ethernet
+header and the batman header is available in non-paged memory of the skb
+and not for the ethernet after the batman header.
+
+eth_type_trans would fail sometimes with drivers which don't ensure that
+all there data is perfectly linearised.
+
+The failure was noticed through a kernel bug Oops generated by the
+skb_pull inside eth_type_trans.
+
+Reported-by: Rafal Lesniak <lesniak@eresi-project.org>
+Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
+Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/staging/batman-adv/soft-interface.c |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/staging/batman-adv/soft-interface.c
++++ b/drivers/staging/batman-adv/soft-interface.c
+@@ -246,6 +246,10 @@ void interface_rx(struct sk_buff *skb, i
+       skb_pull_rcsum(skb, hdr_size);
+ /*    skb_set_mac_header(skb, -sizeof(struct ethhdr));*/
++      if (unlikely(!pskb_may_pull(skb, ETH_HLEN))) {
++              kfree_skb(skb);
++              return;
++      }
+       skb->dev = dev;
+       skb->protocol = eth_type_trans(skb, dev);
diff --git a/queue-2.6.36/staging-frontier-fix-up-some-sysfs-attribute-permissions.patch b/queue-2.6.36/staging-frontier-fix-up-some-sysfs-attribute-permissions.patch
new file mode 100644 (file)
index 0000000..15cb8d8
--- /dev/null
@@ -0,0 +1,31 @@
+From 3bad28ec006ad6ab2bca4e5103860b75391e3c9d Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@suse.de>
+Date: Tue, 16 Nov 2010 11:18:33 -0800
+Subject: Staging: frontier: fix up some sysfs attribute permissions
+
+From: Greg Kroah-Hartman <gregkh@suse.de>
+
+commit 3bad28ec006ad6ab2bca4e5103860b75391e3c9d and
+2a767fda5d0d8dcff465724dfad6ee131489b3f2 upstream merged together.
+
+They should not be writable by any user
+
+Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
+Cc: David Taht <d@teklibre.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/staging/frontier/tranzport.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/staging/frontier/tranzport.c
++++ b/drivers/staging/frontier/tranzport.c
+@@ -204,7 +204,7 @@ static void usb_tranzport_abort_transfer
+     t->value = temp;                                                  \
+     return count;                                                     \
+   }                                                                   \
+-  static DEVICE_ATTR(value, S_IWUGO | S_IRUGO, show_##value, set_##value);
++  static DEVICE_ATTR(value, S_IWUSR | S_IRUGO, show_##value, set_##value);
+ show_int(enable);
+ show_int(offline);
diff --git a/queue-2.6.36/staging-iio-adis16220-fix-up-my-fixup-for-some-sysfs-attribute-permissions.patch b/queue-2.6.36/staging-iio-adis16220-fix-up-my-fixup-for-some-sysfs-attribute-permissions.patch
new file mode 100644 (file)
index 0000000..0e9cffe
--- /dev/null
@@ -0,0 +1,32 @@
+From c9e51d9e4bee3da47623622884f4828e079a0581 Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@suse.de>
+Date: Thu, 18 Nov 2010 11:21:04 -0800
+Subject: Staging: iio: adis16220: fix up my fixup for some sysfs attribute permissions
+
+From: Greg Kroah-Hartman <gregkh@suse.de>
+
+commit c9e51d9e4bee3da47623622884f4828e079a0581 upstream.
+
+They should be writable by root, not readable.
+Doh, stupid me with the wrong flags.
+
+Reported-by: Jonathan Cameron <jic23@cam.ac.uk>
+Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
+Cc: Barry Song <Barry.Song@analog.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/staging/iio/accel/adis16220_core.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/staging/iio/accel/adis16220_core.c
++++ b/drivers/staging/iio/accel/adis16220_core.c
+@@ -506,7 +506,7 @@ static IIO_DEVICE_ATTR(reset, S_IWUSR, N
+               adis16220_write_reset, 0);
+ #define IIO_DEV_ATTR_CAPTURE(_store)                          \
+-      IIO_DEVICE_ATTR(capture, S_IRUSR, NULL, _store, 0)
++      IIO_DEVICE_ATTR(capture, S_IWUSR, NULL, _store, 0)
+ static IIO_DEV_ATTR_CAPTURE(adis16220_write_capture);
diff --git a/queue-2.6.36/staging-iio-adis16220-fix-up-some-sysfs-attribute-permissions.patch b/queue-2.6.36/staging-iio-adis16220-fix-up-some-sysfs-attribute-permissions.patch
new file mode 100644 (file)
index 0000000..7adb09d
--- /dev/null
@@ -0,0 +1,31 @@
+From 1d904e8950c86e670ace237eaea1d48cd81e94df Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@suse.de>
+Date: Tue, 16 Nov 2010 11:19:53 -0800
+Subject: Staging: iio: adis16220: fix up some sysfs attribute permissions
+
+From: Greg Kroah-Hartman <gregkh@suse.de>
+
+commit 1d904e8950c86e670ace237eaea1d48cd81e94df upstream.
+
+They should not be writable by any user
+
+Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
+Cc: Jonathan Cameron <jic23@cam.ac.uk>
+Cc: Barry Song <Barry.Song@analog.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/staging/iio/accel/adis16220_core.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/staging/iio/accel/adis16220_core.c
++++ b/drivers/staging/iio/accel/adis16220_core.c
+@@ -506,7 +506,7 @@ static IIO_DEVICE_ATTR(reset, S_IWUSR, N
+               adis16220_write_reset, 0);
+ #define IIO_DEV_ATTR_CAPTURE(_store)                          \
+-      IIO_DEVICE_ATTR(capture, S_IWUGO, NULL, _store, 0)
++      IIO_DEVICE_ATTR(capture, S_IRUSR, NULL, _store, 0)
+ static IIO_DEV_ATTR_CAPTURE(adis16220_write_capture);
diff --git a/queue-2.6.36/staging-rtl8187se-change-panic-to-warn-when-rf-switch-turned-off.patch b/queue-2.6.36/staging-rtl8187se-change-panic-to-warn-when-rf-switch-turned-off.patch
new file mode 100644 (file)
index 0000000..1fb0b75
--- /dev/null
@@ -0,0 +1,72 @@
+From f36d83a8cb7224f45fdfa1129a616dff56479a09 Mon Sep 17 00:00:00 2001
+From: Larry Finger <Larry.Finger@lwfinger.net>
+Date: Sat, 13 Nov 2010 13:01:56 -0600
+Subject: staging: rtl8187se: Change panic to warn when RF switch turned off
+
+From: Larry Finger <Larry.Finger@lwfinger.net>
+
+commit f36d83a8cb7224f45fdfa1129a616dff56479a09 upstream.
+
+This driver issues a kernel panic over conditions that do not
+justify such drastic action. Change these to log entries with
+a stack dump.
+
+This patch fixes the system crash reported in
+https://bugs.launchpad.net/ubuntu/+source/linux/+bug/674285.
+
+Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
+Reported-and-Tested-by: Robie Basik <rb-oss-3@justgohome.co.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/staging/rtl8187se/r8185b_init.c |   32 +++++++++++++++++++++++---------
+ 1 file changed, 23 insertions(+), 9 deletions(-)
+
+--- a/drivers/staging/rtl8187se/r8185b_init.c
++++ b/drivers/staging/rtl8187se/r8185b_init.c
+@@ -268,8 +268,12 @@ HwHSSIThreeWire(
+                       }
+                       udelay(10);
+               }
+-              if (TryCnt == TC_3W_POLL_MAX_TRY_CNT)
+-                      panic("HwThreeWire(): CmdReg: %#X RE|WE bits are not clear!!\n", u1bTmp);
++              if (TryCnt == TC_3W_POLL_MAX_TRY_CNT) {
++                      printk(KERN_ERR "rtl8187se: HwThreeWire(): CmdReg:"
++                             " %#X RE|WE bits are not clear!!\n", u1bTmp);
++                      dump_stack();
++                      return 0;
++              }
+               // RTL8187S HSSI Read/Write Function
+               u1bTmp = read_nic_byte(dev, RF_SW_CONFIG);
+@@ -309,13 +313,23 @@ HwHSSIThreeWire(
+                               int idx;
+                               int ByteCnt = nDataBufBitCnt / 8;
+                                 //printk("%d\n",nDataBufBitCnt);
+-                              if ((nDataBufBitCnt % 8) != 0)
+-                              panic("HwThreeWire(): nDataBufBitCnt(%d) should be multiple of 8!!!\n",
+-                              nDataBufBitCnt);
+-
+-                             if (nDataBufBitCnt > 64)
+-                              panic("HwThreeWire(): nDataBufBitCnt(%d) should <= 64!!!\n",
+-                              nDataBufBitCnt);
++                              if ((nDataBufBitCnt % 8) != 0) {
++                                      printk(KERN_ERR "rtl8187se: "
++                                             "HwThreeWire(): nDataBufBitCnt(%d)"
++                                             " should be multiple of 8!!!\n",
++                                             nDataBufBitCnt);
++                                      dump_stack();
++                                      nDataBufBitCnt += 8;
++                                      nDataBufBitCnt &= ~7;
++                              }
++
++                             if (nDataBufBitCnt > 64) {
++                                      printk(KERN_ERR "rtl8187se: HwThreeWire():"
++                                             " nDataBufBitCnt(%d) should <= 64!!!\n",
++                                             nDataBufBitCnt);
++                                      dump_stack();
++                                      nDataBufBitCnt = 64;
++                              }
+                               for(idx = 0; idx < ByteCnt; idx++)
+                               {
diff --git a/queue-2.6.36/staging-samsung-laptop-fix-up-my-fixup-for-some-sysfs-attribute-permissions.patch b/queue-2.6.36/staging-samsung-laptop-fix-up-my-fixup-for-some-sysfs-attribute-permissions.patch
new file mode 100644 (file)
index 0000000..6d63f53
--- /dev/null
@@ -0,0 +1,30 @@
+From 4d7bc388b44e42a1feafa35e50eef4f24d6ca59d Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@suse.de>
+Date: Thu, 18 Nov 2010 11:21:04 -0800
+Subject: Staging: samsung-laptop: fix up my fixup for some sysfs attribute permissions
+
+From: Greg Kroah-Hartman <gregkh@suse.de>
+
+commit 4d7bc388b44e42a1feafa35e50eef4f24d6ca59d upstream.
+
+They should be writable by root, not readable.
+Doh, stupid me with the wrong flags.
+
+Reported-by: Jonathan Cameron <jic23@cam.ac.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/staging/samsung-laptop/samsung-laptop.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/staging/samsung-laptop/samsung-laptop.c
++++ b/drivers/staging/samsung-laptop/samsung-laptop.c
+@@ -356,7 +356,7 @@ static ssize_t set_silent_state(struct d
+       }
+       return count;
+ }
+-static DEVICE_ATTR(silent, S_IRUSR | S_IRUGO,
++static DEVICE_ATTR(silent, S_IWUSR | S_IRUGO,
+                  get_silent_state, set_silent_state);
diff --git a/queue-2.6.36/staging-samsung-laptop-fix-up-some-sysfs-attribute-permissions.patch b/queue-2.6.36/staging-samsung-laptop-fix-up-some-sysfs-attribute-permissions.patch
new file mode 100644 (file)
index 0000000..428a182
--- /dev/null
@@ -0,0 +1,29 @@
+From 90c05b97fdec8d2196e420d98f774bab731af7aa Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@suse.de>
+Date: Tue, 16 Nov 2010 11:21:03 -0800
+Subject: Staging: samsung-laptop: fix up some sysfs attribute permissions
+
+From: Greg Kroah-Hartman <gregkh@suse.de>
+
+commit 90c05b97fdec8d2196e420d98f774bab731af7aa upstream.
+
+They should not be writable by any user
+
+Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/staging/samsung-laptop/samsung-laptop.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/staging/samsung-laptop/samsung-laptop.c
++++ b/drivers/staging/samsung-laptop/samsung-laptop.c
+@@ -356,7 +356,7 @@ static ssize_t set_silent_state(struct d
+       }
+       return count;
+ }
+-static DEVICE_ATTR(silent, S_IWUGO | S_IRUGO,
++static DEVICE_ATTR(silent, S_IRUSR | S_IRUGO,
+                  get_silent_state, set_silent_state);
diff --git a/queue-2.6.36/staging-udlfb-fix-up-some-sysfs-attribute-permissions.patch b/queue-2.6.36/staging-udlfb-fix-up-some-sysfs-attribute-permissions.patch
new file mode 100644 (file)
index 0000000..720ebbd
--- /dev/null
@@ -0,0 +1,31 @@
+From cc9ca9dfddda46b1802d325891a69d7efdbe1f1e Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@suse.de>
+Date: Tue, 16 Nov 2010 11:21:36 -0800
+Subject: Staging: udlfb: fix up some sysfs attribute permissions
+
+From: Greg Kroah-Hartman <gregkh@suse.de>
+
+commit cc9ca9dfddda46b1802d325891a69d7efdbe1f1e and
+cc9ca9dfddda46b1802d325891a69d7efdbe1f1e upstream merged together.
+
+They should not be writable by any user
+
+Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
+Cc: Bernie Thompson <bernie@plugable.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/staging/udlfb/udlfb.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/staging/udlfb/udlfb.c
++++ b/drivers/staging/udlfb/udlfb.c
+@@ -1143,7 +1143,7 @@ static struct device_attribute fb_device
+       __ATTR_RO(metrics_bytes_sent),
+       __ATTR_RO(metrics_cpu_kcycles_used),
+       __ATTR_RO(metrics_misc),
+-      __ATTR(metrics_reset, S_IWUGO, NULL, metrics_reset_store),
++      __ATTR(metrics_reset, S_IWUSR, NULL, metrics_reset_store),
+       __ATTR_RW(use_defio),
+ };
diff --git a/queue-2.6.36/staging-zram-fix-up-some-sysfs-attribute-permissions.patch b/queue-2.6.36/staging-zram-fix-up-some-sysfs-attribute-permissions.patch
new file mode 100644 (file)
index 0000000..fa77312
--- /dev/null
@@ -0,0 +1,33 @@
+From 0281b490dd7b96990724f4a15842c55657699aed Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@suse.de>
+Date: Tue, 16 Nov 2010 11:22:43 -0800
+Subject: Staging: zram: fix up some sysfs attribute permissions
+
+From: Greg Kroah-Hartman <gregkh@suse.de>
+
+commit 0281b490dd7b96990724f4a15842c55657699aed upstream.
+
+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>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+diff --git a/drivers/staging/zram/zram_sysfs.c b/drivers/staging/zram/zram_sysfs.c
+index 6c574a9..c9b52b9 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,
+       return sprintf(buf, "%llu\n", val);
+ }
+-static DEVICE_ATTR(disksize, S_IRUGO | S_IWUGO,
++static DEVICE_ATTR(disksize, S_IRUGO | S_IRUSR,
+               disksize_show, disksize_store);
+ static DEVICE_ATTR(initstate, S_IRUGO, initstate_show, NULL);
+-static DEVICE_ATTR(reset, S_IWUGO, NULL, reset_store);
++static DEVICE_ATTR(reset, S_IRUSR, NULL, reset_store);
+ static DEVICE_ATTR(num_reads, S_IRUGO, num_reads_show, NULL);
+ static DEVICE_ATTR(num_writes, S_IRUGO, num_writes_show, NULL);
+ static DEVICE_ATTR(invalid_io, S_IRUGO, invalid_io_show, NULL);