public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Mikulas Patocka <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: hpa@zytor.com, mpatocka@redhat.com, peterz@infradead.org,
	linux-kernel@vger.kernel.org, torvalds@linux-foundation.org,
	mingo@kernel.org, tglx@linutronix.de
Subject: [tip:sched/urgent] sched/wait: Remove might_sleep() from wait_event_cmd()
Date: Tue, 3 Feb 2015 03:22:07 -0800	[thread overview]
Message-ID: <tip-3e87523897e18a3e17fc8955ed795188be737ff1@git.kernel.org> (raw)
In-Reply-To: <alpine.LRH.2.02.1502020935580.13510@file01.intranet.prod.int.rdu2.redhat.com>

Commit-ID:  3e87523897e18a3e17fc8955ed795188be737ff1
Gitweb:     http://git.kernel.org/tip/3e87523897e18a3e17fc8955ed795188be737ff1
Author:     Mikulas Patocka <mpatocka@redhat.com>
AuthorDate: Mon, 2 Feb 2015 09:39:02 -0500
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Tue, 3 Feb 2015 12:14:25 +0100

sched/wait: Remove might_sleep() from wait_event_cmd()

The patch e22b886a8a43 ("sched/wait: Add might_sleep() checks")
introduced a bug in the raid5 subsystem.

The function raid5_quiesce() (and resize_stripes()) uses the 'cmd'
part to release and acquire a spinlock (so we call the sleep
primitives in atomic context), and therefore we cannot do the
might_sleep() check.

Remove it.

Fixes: e22b886a8a43 ("sched/wait: Add might_sleep() checks")
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: http://lkml.kernel.org/r/alpine.LRH.2.02.1502020935580.13510@file01.intranet.prod.int.rdu2.redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 include/linux/wait.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/linux/wait.h b/include/linux/wait.h
index 2232ed1..37423e0 100644
--- a/include/linux/wait.h
+++ b/include/linux/wait.h
@@ -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);			\

      parent reply	other threads:[~2015-02-03 11:23 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
2015-02-03 11:06   ` Peter Zijlstra
2015-02-03 21:30     ` NeilBrown
2015-02-03 11:22 ` tip-bot for Mikulas Patocka [this message]

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=tip-3e87523897e18a3e17fc8955ed795188be737ff1@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=mpatocka@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    /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