Re: [PATCH] initialize fb_info->lock mutex in the framebuffer_alloc()

From: <hidden>
Date: 2009-05-04 09:53:07

Krzysztof Helt napisa³(a):
From: Krzysztof Helt >krzysztof.h1@wp.pl>

The fb_info->lock mutex should be initialized inside 
the framebuffer_alloc() function. Otherwise, someone
may call a fb layer function which indirectly uses uninitialized 
mutex.
Move initialization of the mutex from the register_framebuffer()
to framebuffer_alloc().

This may cause problems for drivers which do not use
the framebuffer_alloc() to allocate the fb_info structure.
Convert the two last drivers to use the framebuffer_alloc().

Signed-off-by: Krzysztof Helt >krzysztof.h1@wp.pl>
---
Please drop this patch as it breaks framebuffers with
static global fb_info structures. The fb_info->lock
will be uninitialized. Thanks to Geert for helping
me realizing that.

I will repost driver conversion to the framebuffer_alloc()
without moving mutex initialization.

Regards,
Krzysztof


----------------------------------------------------------------------
Gotowka na koncie. Otworz konto direct i wez podwojny limit. 	 
http://link.interia.pl/f2145


------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance & Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help