From: Greg Kroah-Hartman Date: Mon, 15 Nov 2010 19:35:49 +0000 (-0800) Subject: USB: misc: usbled: fix up some sysfs attribute permissions X-Git-Tag: v2.6.35.10~65 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=f523d85f52859960e420928d812341de4e6e0054;p=karo-tx-linux.git USB: misc: usbled: fix up some sysfs attribute permissions commit 48f115470e68d443436b76b22dad63ffbffd6b97 upstream. They should not be writable by any user. Reported-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman Signed-off-by: Andi Kleen --- diff --git a/drivers/usb/misc/usbled.c b/drivers/usb/misc/usbled.c index 63da2c3c838f..c96f51de1696 100644 --- a/drivers/usb/misc/usbled.c +++ b/drivers/usb/misc/usbled.c @@ -94,7 +94,7 @@ static ssize_t set_##value(struct device *dev, struct device_attribute *attr, co change_color(led); \ return count; \ } \ -static DEVICE_ATTR(value, S_IWUGO | S_IRUGO, show_##value, set_##value); +static DEVICE_ATTR(value, S_IRUGO | S_IWUSR, show_##value, set_##value); show_set(blue); show_set(red); show_set(green);