lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 18 Apr 2008 13:41:12 -0400
From:	Andres Salomon <dilinger@...ued.net>
To:	Thiago Galesi <thiagogalesi@...il.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	linux-fbdev-devel@...ts.sourceforge.net,
	linux-kernel@...r.kernel.org
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@...il.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@...il.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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ