* [PATCH] carminefb: Fix module parameters permissions
@ 2011-07-08 9:04 Jean Delvare
2011-07-13 8:19 ` Paul Mundt
0 siblings, 1 reply; 2+ messages in thread
From: Jean Delvare @ 2011-07-08 9:04 UTC (permalink / raw)
To: linux-fbdev
The third parameter of module_param is supposed to be an octal value.
The missing leading "0" causes the following:
$ ls -l /sys/module/carminefb/parameters/
total 0
-rw-rwxr-- 1 root root 4096 Jul 8 08:55 fb_displays
-rw-rwxr-- 1 root root 4096 Jul 8 08:55 fb_mode
-rw-rwxr-- 1 root root 4096 Jul 8 08:55 fb_mode_str
After fixing the perm parameter, we get the expected:
$ ls -l /sys/module/carminefb/parameters/
total 0
-r--r--r-- 1 root root 4096 Jul 8 08:56 fb_displays
-r--r--r-- 1 root root 4096 Jul 8 08:56 fb_mode
-r--r--r-- 1 root root 4096 Jul 8 08:56 fb_mode_str
Signed-off-by: Jean Delvare <jdelvare@suse.de>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Sebastian Siewior <bigeasy@linutronix.de>
Cc: stable@kernel.org
---
drivers/video/carminefb.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- linux-3.0-rc6.orig/drivers/video/carminefb.c 2011-07-08 08:47:52.000000000 +0200
+++ linux-3.0-rc6/drivers/video/carminefb.c 2011-07-08 08:55:21.000000000 +0200
@@ -32,11 +32,11 @@
#define CARMINEFB_DEFAULT_VIDEO_MODE 1
static unsigned int fb_mode = CARMINEFB_DEFAULT_VIDEO_MODE;
-module_param(fb_mode, uint, 444);
+module_param(fb_mode, uint, 0444);
MODULE_PARM_DESC(fb_mode, "Initial video mode as integer.");
static char *fb_mode_str;
-module_param(fb_mode_str, charp, 444);
+module_param(fb_mode_str, charp, 0444);
MODULE_PARM_DESC(fb_mode_str, "Initial video mode in characters.");
/*
@@ -46,7 +46,7 @@ MODULE_PARM_DESC(fb_mode_str, "Initial v
* 0b010 Display 1
*/
static int fb_displays = CARMINE_USE_DISPLAY0 | CARMINE_USE_DISPLAY1;
-module_param(fb_displays, int, 444);
+module_param(fb_displays, int, 0444);
MODULE_PARM_DESC(fb_displays, "Bit mode, which displays are used");
struct carmine_hw {
--
Jean Delvare
Suse L3
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] carminefb: Fix module parameters permissions
2011-07-08 9:04 [PATCH] carminefb: Fix module parameters permissions Jean Delvare
@ 2011-07-13 8:19 ` Paul Mundt
0 siblings, 0 replies; 2+ messages in thread
From: Paul Mundt @ 2011-07-13 8:19 UTC (permalink / raw)
To: linux-fbdev
On Fri, Jul 08, 2011 at 11:04:38AM +0200, Jean Delvare wrote:
> The third parameter of module_param is supposed to be an octal value.
> The missing leading "0" causes the following:
>
> $ ls -l /sys/module/carminefb/parameters/
> total 0
> -rw-rwxr-- 1 root root 4096 Jul 8 08:55 fb_displays
> -rw-rwxr-- 1 root root 4096 Jul 8 08:55 fb_mode
> -rw-rwxr-- 1 root root 4096 Jul 8 08:55 fb_mode_str
>
> After fixing the perm parameter, we get the expected:
>
> $ ls -l /sys/module/carminefb/parameters/
> total 0
> -r--r--r-- 1 root root 4096 Jul 8 08:56 fb_displays
> -r--r--r-- 1 root root 4096 Jul 8 08:56 fb_mode
> -r--r--r-- 1 root root 4096 Jul 8 08:56 fb_mode_str
>
> Signed-off-by: Jean Delvare <jdelvare@suse.de>
> Cc: Paul Mundt <lethal@linux-sh.org>
> Cc: Sebastian Siewior <bigeasy@linutronix.de>
> Cc: stable@kernel.org
> ---
> drivers/video/carminefb.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-07-13 8:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-08 9:04 [PATCH] carminefb: Fix module parameters permissions Jean Delvare
2011-07-13 8:19 ` Paul Mundt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).