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:	Tue, 3 Feb 2015 09:12:53 +1100
From:	NeilBrown <neilb@...e.de>
To:	Mikulas Patocka <mpatocka@...hat.com>
Cc:	Peter Zijlstra <peterz@...radead.org>,
	Zdenek Kabelac <zkabelac@...hat.com>, tglx@...utronix.de,
	ilya.dryomov@...tank.com, umgwanakikbuti@...il.com,
	Oleg Nesterov <oleg@...hat.com>,
	Ingo Molnar <mingo@...nel.org>, dm-devel@...hat.com,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Remove might_sleep from wait_event_cmd

On Mon, 2 Feb 2015 09:39:02 -0500 (EST) Mikulas Patocka <mpatocka@...hat.com>
wrote:

> Hi
> 
> Please apply this before 3.19 is released.
> 
> Mikulas
> 
> 
> The patch e22b886a8a43b147e1994a9f970f678fc0df2033 introduced a bug in the
> raid5 subsystem.
> 
> The function raid5_quiesce (and resize_stripes) calls 
> lock_all_device_hash_locks_irq that disables interrupts and takes a few 
> spinlocks, then it calls wait_event_cmd with cmd1 
> unlock_all_device_hash_locks_irq(conf) and cmd2 
> lock_all_device_hash_locks_irq(conf). cmd1 unlocks the spinlocks and 
> enables interrupts, cmd2 disables interrupts and locks the spinlock.
> 
> The patch e22b886a8a43b147e1994a9f970f678fc0df2033 adds might_sleep() to a
> position where spinlocks are taken, thus it introduces a bug.
> 
> This patch removes might_sleep() from wait_event_cmd.
> 
> Signed-off-by: Mikulas Patocka <mpatocka@...hat.com>
> 
> ---
>  include/linux/wait.h |    1 -
>  1 file changed, 1 deletion(-)
> 
> Index: linux-2.6/include/linux/wait.h
> ===================================================================
> --- linux-2.6.orig/include/linux/wait.h	2014-12-30 01:19:25.564231262 +0100
> +++ linux-2.6/include/linux/wait.h	2015-02-02 15:30:16.766354658 +0100
> @@ -363,7 +363,6 @@ do {									\
>   */
>  #define wait_event_cmd(wq, condition, cmd1, cmd2)			\
>  do {									\
> -	might_sleep();							\
>  	if (condition)							\
>  		break;							\
>  	__wait_event_cmd(wq, condition, cmd1, cmd2);			\
> --
> 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/


I support this patch.
However in case it doesn't get in, I've queued up a patch to change raid5.c
to use __wait_event_cmd instead...

NeilBrown

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ