From: Rusty Russell Date: Wed, 14 May 2014 01:03:48 +0000 (+0930) Subject: drivers/video/fbdev/sm501fb.c: avoid world-writable sysfs files. X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=43d910ff15833c341f1c44eec77b34d7b9f42d21;p=linux-beck.git drivers/video/fbdev/sm501fb.c: avoid world-writable sysfs files. In line with practice for module parameters, we're adding a build-time check that sysfs files aren't world-writable. Cc: Vincent Sanders Cc: Ben Dooks Signed-off-by: Rusty Russell --- diff --git a/drivers/video/fbdev/sm501fb.c b/drivers/video/fbdev/sm501fb.c index 1501979099dc..c2c8eb668784 100644 --- a/drivers/video/fbdev/sm501fb.c +++ b/drivers/video/fbdev/sm501fb.c @@ -1215,7 +1215,7 @@ static ssize_t sm501fb_crtsrc_store(struct device *dev, } /* Prepare the device_attr for registration with sysfs later */ -static DEVICE_ATTR(crt_src, 0666, sm501fb_crtsrc_show, sm501fb_crtsrc_store); +static DEVICE_ATTR(crt_src, 0664, sm501fb_crtsrc_show, sm501fb_crtsrc_store); /* sm501fb_show_regs *