]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
USB: misc: trancevibrator: fix up a sysfs attribute permission
authorGreg Kroah-Hartman <gregkh@suse.de>
Mon, 15 Nov 2010 19:34:26 +0000 (11:34 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 21 Mar 2011 19:44:04 +0000 (12:44 -0700)
commit d489a4b3926bad571d404ca6508f6744b9602776 upstream.

It should not be writable by any user.

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Sam Hocevar <sam@zoy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/misc/trancevibrator.c

index 2e14102955c5936def7394c9faea1306696f18bb..d509dcb29b38a5e7579856ba9057dd974c02d717 100644 (file)
@@ -85,7 +85,7 @@ static ssize_t set_speed(struct device *dev, struct device_attribute *attr,
        return count;
 }
 
-static DEVICE_ATTR(speed, S_IWUGO | S_IRUGO, show_speed, set_speed);
+static DEVICE_ATTR(speed, S_IRUGO | S_IWUSR, show_speed, set_speed);
 
 static int tv_probe(struct usb_interface *interface,
                    const struct usb_device_id *id)