[PATCH 1/1] [Maverick] UBUNTU: SAUCE: fbcon -- fix OOPs triggered by race prevention fixes
Andy Whitcroft
apw at canonical.com
Fri Sep 10 16:26:55 UTC 2010
BugLink: http://bugs.launchpad.net/bugs/614008
The fix below added reference counting to framebuffer opens, it
inadvertantly does not handle the totally missing framebuffer case:
UBUNTU: SAUCE: fbcon -- fix race between open and removal of framebuffers
lshw tickles this searching for framebuffers leading to an OOPs and boot
hangs for some machines.
Initial-fix-by: Dave Gilbert
Signed-off-by: Andy Whitcroft <apw at canonical.com>
---
drivers/video/fbmem.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index 02eb135..0088013 100644
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c
@@ -1407,7 +1407,8 @@ __releases(®istered_lock)
spin_lock(®istered_lock);
fb_info = registered_fb[idx];
- fb_info->ref_count++;
+ if (fb_info)
+ fb_info->ref_count++;
spin_unlock(®istered_lock);
return fb_info;
--
1.7.0.4
More information about the kernel-team
mailing list