* [VIDEO] vfb: only enable if explicitly requested when compiled in
@ 2008-06-01 12:54 Frans Pop
2008-06-02 16:56 ` [Linux-fbdev-devel] " Krzysztof Helt
0 siblings, 1 reply; 2+ messages in thread
From: Frans Pop @ 2008-06-01 12:54 UTC (permalink / raw)
To: linux-fbdev-devel; +Cc: linux-kernel, Andrew Morton, Antonino A. Daplas
From: Frans Pop <elendil@planet.nl>
The Kconfig help for the vfb driver says:
Do NOT enable it for normal systems! To protect the innocent, it
has to be enabled explicitly at boot time using the kernel option
`video=vfb:'.
This change lets the code match the description.
Support for vfb:disable is kept for backwards compatibility; vfb:off
works because it is tested at a higher level.
Signed-off-by: Frans Pop <elendil@planet.nl>
CC: Antonino A. Daplas <adaplas@gmail.com>
CC: Andrew Morton <akpm@linux-foundation.org>
---
Note: any undefined option (e.g. vfb:enable) will also enable this driver.
The relevant code has been unchanged since before the migration to
git (2.6.12).
This patch fixes bugzilla #9310 and was the root cause behind
http://lkml.org/lkml/2008/5/31/220.
My confusion stemmed from the fact that I was still assuming that the
Kconfig help would be correct (even though Antonino had already
determined it was not: http://lkml.org/lkml/2007/10/14/25, but somehow
my brain never parsed that).
diff --git a/drivers/video/vfb.c b/drivers/video/vfb.c
index 072638a..51e935f 100644
--- a/drivers/video/vfb.c
+++ b/drivers/video/vfb.c
@@ -443,19 +443,29 @@ static int vfb_mmap(struct fb_info *info,
}
#ifndef MODULE
+/*
+ * The virtual framebuffer driver is only enabled if explicitly
+ * requested by passing 'video=vfb:' (or any actual options).
+ */
static int __init vfb_setup(char *options)
{
char *this_opt;
- vfb_enable = 1;
+ vfb_enable = 0;
- if (!options || !*options)
+ if (!options)
+ return 1;
+
+ vfb_enable = 1;
+
+ if (!*options)
return 1;
while ((this_opt = strsep(&options, ",")) != NULL) {
if (!*this_opt)
continue;
- if (!strncmp(this_opt, "disable", 7))
+ /* Test disable for backwards compatibility */
+ if (!strcmp(this_opt, "disable"))
vfb_enable = 0;
}
return 1;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Linux-fbdev-devel] [VIDEO] vfb: only enable if explicitly requested when compiled in
2008-06-01 12:54 [VIDEO] vfb: only enable if explicitly requested when compiled in Frans Pop
@ 2008-06-02 16:56 ` Krzysztof Helt
0 siblings, 0 replies; 2+ messages in thread
From: Krzysztof Helt @ 2008-06-02 16:56 UTC (permalink / raw)
To: Frans Pop
Cc: linux-fbdev-devel, Andrew Morton, linux-kernel, Antonino A. Daplas
On Sun, 1 Jun 2008 14:54:22 +0200
Frans Pop <elendil@planet.nl> wrote:
> From: Frans Pop <elendil@planet.nl>
>
> The Kconfig help for the vfb driver says:
> Do NOT enable it for normal systems! To protect the innocent, it
> has to be enabled explicitly at boot time using the kernel option
> `video=vfb:'.
>
> This change lets the code match the description.
>
> Support for vfb:disable is kept for backwards compatibility; vfb:off
> works because it is tested at a higher level.
>
> Signed-off-by: Frans Pop <elendil@planet.nl>
> CC: Antonino A. Daplas <adaplas@gmail.com>
> CC: Andrew Morton <akpm@linux-foundation.org>
>
> ---
Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl>
----------------------------------------------------------------------
Podbij Dziki Zachod!Gra strategiczna online
Sprawdz >>> http://link.interia.pl/f1dff
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-06-02 16:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-01 12:54 [VIDEO] vfb: only enable if explicitly requested when compiled in Frans Pop
2008-06-02 16:56 ` [Linux-fbdev-devel] " Krzysztof Helt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®