Thread (6 messages) 6 messages, 3 authors, 2008-04-19

Re: [PATCH] fb: Remove use of lock_kernel / unlock_kernel in fbmem

flat view

From: Andres Salomon <hidden>
Date: 2008-04-18 17:39:08
Also in: lkml

On Wed, 16 Apr 2008 20:00:59 -0300
Thiago Galesi [off-list ref] wrote:
This patch removes lock_kernel(), unlock_kernel() usage in fbmem.c and replaces it with a mutex

Signed-off-by: Thiago Galesi <redacted>
[...]
quoted hunk ↗ jump to hunk
@@ -1413,6 +1435,8 @@ register_framebuffer(struct fb_info *fb_
 
 	event.info = fb_info;
 	fb_notifier_call_chain(FB_EVENT_FB_REGISTERED, &event);
+
+	mutex_init(&fb_info->hwlock);
 	return 0;
 }
Just a minor nit; in general, I'd think you would want to completely
initialize the structure (including calling mutex_init) before
registering the structure with the rest of the system (in this case,
with registered_fb and *_call_notifier_chain).  Initializing after
registration is just asking for a race conditions.


 
-- 
Need a kernel or Debian developer?  Contact me, I'm looking for contracts.

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help