rocket: don't let random users reset the controller

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
diff --git a/drivers/char/rocket.c b/drivers/char/rocket.c
index cbee71b..72f2892 100644
--- a/drivers/char/rocket.c
+++ b/drivers/char/rocket.c
@@ -1399,6 +1399,9 @@
 {
 	int reset;
 
+	if (!capable(CAP_SYS_ADMIN))
+		return -EPERM;
+
 	if (copy_from_user(&reset, arg, sizeof (int)))
 		return -EFAULT;
 	if (reset)