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, 27 Jul 2009 13:45:12 +0200
From:	Martin Schwidefsky <schwidefsky@...ibm.com>
To:	Thomas Gleixner <tglx@...utronix.de>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Ingo Molnar <mingo@...e.hu>,
	Peter Zijlstra <peterz@...radead.org>
Subject: Re: [Patch RFC 13/37] s390: cio/crw: semaphore cleanup

On Sun, 26 Jul 2009 08:18:10 -0000
Thomas Gleixner <tglx@...utronix.de> wrote:

> The usage of this "mutex" is non obvious and probably a completion in
> some places. Make it a semaphore.
> 
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
> Cc: Martin Schwidefsky <schwidefsky@...ibm.com>
> ---
>  drivers/s390/cio/crw.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Index: linux-2.6-tip/drivers/s390/cio/crw.c
> ===================================================================
> --- linux-2.6-tip.orig/drivers/s390/cio/crw.c
> +++ linux-2.6-tip/drivers/s390/cio/crw.c
> @@ -137,7 +137,7 @@ void crw_handle_channel_report(void)
>   */
>  static int __init crw_init_semaphore(void)
>  {
> -	init_MUTEX_LOCKED(&crw_semaphore);
> +	semaphore_init_locked(&crw_semaphore);
>  	return 0;
>  }
>  pure_initcall(crw_init_semaphore);
> 
> 

The crw_semaphore is a real semaphore and the init_MUTEX_LOCKED is
indeed confusing. semaphore_init_locked is a more sensible name even if
the end result is in both cases just a sema_init(sem, 0). Anyway, fine
with me:

Acked-By: Martin Schwidefsky <schwidefsky@...ibm.com>

-- 
blue skies,
   Martin.

"Reality continues to ruin my life." - Calvin.

--
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