瀏覽代碼

USB: misc: usbled: fix up some sysfs attribute permissions

They should not be writable by any user.

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Greg Kroah-Hartman 14 年之前
父節點
當前提交
48f115470e
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/usb/misc/usbled.c

+ 1 - 1
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);