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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 13 Jun 2016 17:48:34 +0200
From:	Arnd Bergmann <arnd@...db.de>
To:	Binoy Jayan <binoy.jayan@...aro.org>
Cc:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: gdm724x: Replace semaphore netlink with mutex

On Monday, June 13, 2016 7:59:20 PM CEST Binoy Jayan wrote:
> 
> -#if defined(DEFINE_MUTEX)
> -static DEFINE_MUTEX(netlink_mutex);
> -#else
> -static struct semaphore netlink_mutex;
> -#define mutex_lock(x)          down(x)
> -#define mutex_unlock(x)                up(x)
> -#endif
> +static struct mutex netlink_mutex;
> 

Good catch! I think the patch is correct, but the DEFINE_MUTEX
here seems preferable over the runtime mutex_init() call.

	Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ