From: Vitaly Wool <vitalywool@gmail.com>
To: drzeus-mmc@drzeus.cx
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] fix "prev->state: 2 != TASK_RUNNING??" problem on SD/MMC card removal
Date: Thu, 23 Nov 2006 18:42:17 +0300 [thread overview]
Message-ID: <20061123184217.a971d267.vitalywool@gmail.com> (raw)
Hello Pierre,
currently on SD/MMC card removal the system exhibits the following message (the platform is ARM Versatile):
prev->state: 2 != TASK_RUNNING??
mmcqd/762[CPU#0]: BUG in __schedule at linux-2.6/kernel/sched.c:3826
The patch inlined below fixes this problem.
drivers/mmc/mmc_queue.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Signed-off-by: Vitaly Wool <vitalywool@gmail.com>
Index: linux-2.6.18/drivers/mmc/mmc_queue.c
===================================================================
--- linux-2.6.18.orig/drivers/mmc/mmc_queue.c
+++ linux-2.6.18/drivers/mmc/mmc_queue.c
@@ -84,8 +84,10 @@ static int mmc_queue_thread(void *d)
spin_unlock_irq(q->queue_lock);
if (!req) {
- if (mq->flags & MMC_QUEUE_EXIT)
+ if (mq->flags & MMC_QUEUE_EXIT) {
+ set_current_state(TASK_RUNNING);
break;
+ }
up(&mq->thread_sem);
schedule();
down(&mq->thread_sem);
next reply other threads:[~2006-11-23 15:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-23 15:42 Vitaly Wool [this message]
2006-11-26 20:25 ` Pierre Ossman
2006-11-27 9:13 ` Vitaly Wool
2006-11-27 13:47 ` Pierre Ossman
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=20061123184217.a971d267.vitalywool@gmail.com \
--to=vitalywool@gmail.com \
--cc=drzeus-mmc@drzeus.cx \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®