Messages in this thread | | | Date | Fri, 18 Apr 2008 13:41:12 -0400 | From | Andres Salomon <> | Subject | Re: [Linux-fbdev-devel] [PATCH] fb: Remove use of lock_kernel / unlock_kernel in fbmem |
| |
On Wed, 16 Apr 2008 20:00:59 -0300 Thiago Galesi <thiagogalesi@gmail.com> wrote:
> > This patch removes lock_kernel(), unlock_kernel() usage in fbmem.c and replaces it with a mutex > > Signed-off-by: Thiago Galesi <thiagogalesi@gmail.com> > [...] > @@ -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.
| |