From: NeilBrown <neilb@suse.de>
To: Mikulas Patocka <mpatocka@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
Zdenek Kabelac <zkabelac@redhat.com>,
tglx@linutronix.de, ilya.dryomov@inktank.com,
umgwanakikbuti@gmail.com, Oleg Nesterov <oleg@redhat.com>,
Ingo Molnar <mingo@kernel.org>,
dm-devel@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Remove might_sleep from wait_event_cmd
Date: Tue, 3 Feb 2015 09:12:53 +1100 [thread overview]
Message-ID: <20150203091253.60ded1d7@notabene.brown> (raw)
In-Reply-To: <alpine.LRH.2.02.1502020935580.13510@file01.intranet.prod.int.rdu2.redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1938 bytes --]
On Mon, 2 Feb 2015 09:39:02 -0500 (EST) Mikulas Patocka <mpatocka@redhat.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@redhat.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@vger.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
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 811 bytes --]
next prev parent reply other threads:[~2015-02-02 22:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-02 14:39 [PATCH] Remove might_sleep from wait_event_cmd Mikulas Patocka
2015-02-02 22:12 ` NeilBrown [this message]
2015-02-03 11:06 ` Peter Zijlstra
2015-02-03 21:30 ` NeilBrown
2015-02-03 11:22 ` [tip:sched/urgent] sched/wait: Remove might_sleep() from wait_event_cmd() tip-bot for Mikulas Patocka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150203091253.60ded1d7@notabene.brown \
--to=neilb@suse.de \
--cc=dm-devel@redhat.com \
--cc=ilya.dryomov@inktank.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=mpatocka@redhat.com \
--cc=oleg@redhat.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=umgwanakikbuti@gmail.com \
--cc=zkabelac@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox