* [PATCH] fix "prev->state: 2 != TASK_RUNNING??" problem on SD/MMC card removal
@ 2006-11-23 15:42 Vitaly Wool
2006-11-26 20:25 ` Pierre Ossman
0 siblings, 1 reply; 4+ messages in thread
From: Vitaly Wool @ 2006-11-23 15:42 UTC (permalink / raw)
To: drzeus-mmc; +Cc: linux-kernel
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);
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] fix "prev->state: 2 != TASK_RUNNING??" problem on SD/MMC card removal 2006-11-23 15:42 [PATCH] fix "prev->state: 2 != TASK_RUNNING??" problem on SD/MMC card removal Vitaly Wool @ 2006-11-26 20:25 ` Pierre Ossman 2006-11-27 9:13 ` Vitaly Wool 0 siblings, 1 reply; 4+ messages in thread From: Pierre Ossman @ 2006-11-26 20:25 UTC (permalink / raw) To: Vitaly Wool; +Cc: linux-kernel Vitaly Wool wrote: > 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 > Hmm... I can't find any such requirement in HEAD, or 2.6.18. What kernel are you running? Rgds -- -- Pierre Ossman Linux kernel, MMC maintainer http://www.kernel.org PulseAudio, core developer http://pulseaudio.org rdesktop, core developer http://www.rdesktop.org ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] fix "prev->state: 2 != TASK_RUNNING??" problem on SD/MMC card removal 2006-11-26 20:25 ` Pierre Ossman @ 2006-11-27 9:13 ` Vitaly Wool 2006-11-27 13:47 ` Pierre Ossman 0 siblings, 1 reply; 4+ messages in thread From: Vitaly Wool @ 2006-11-27 9:13 UTC (permalink / raw) To: Pierre Ossman; +Cc: linux-kernel On 11/26/06, Pierre Ossman <drzeus-mmc@drzeus.cx> wrote: > Hmm... I can't find any such requirement in HEAD, or 2.6.18. What kernel > are you running? 2.6.18 + -rt patches by Ingo. Vitaly ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] fix "prev->state: 2 != TASK_RUNNING??" problem on SD/MMC card removal 2006-11-27 9:13 ` Vitaly Wool @ 2006-11-27 13:47 ` Pierre Ossman 0 siblings, 0 replies; 4+ messages in thread From: Pierre Ossman @ 2006-11-27 13:47 UTC (permalink / raw) To: Vitaly Wool; +Cc: linux-kernel Vitaly Wool wrote: > On 11/26/06, Pierre Ossman <drzeus-mmc@drzeus.cx> wrote: >> Hmm... I can't find any such requirement in HEAD, or 2.6.18. What kernel >> are you running? > > 2.6.18 + -rt patches by Ingo. > I guess the check is in the rt set somewhere then. Anyway, the mmc queue thread has undergone some changes so your patch needs a bit of a tweak. But I'll put it on my todo and make sure it gets in during the next merge window. Rgds -- -- Pierre Ossman Linux kernel, MMC maintainer http://www.kernel.org PulseAudio, core developer http://pulseaudio.org rdesktop, core developer http://www.rdesktop.org ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-11-27 13:47 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2006-11-23 15:42 [PATCH] fix "prev->state: 2 != TASK_RUNNING??" problem on SD/MMC card removal Vitaly Wool 2006-11-26 20:25 ` Pierre Ossman 2006-11-27 9:13 ` Vitaly Wool 2006-11-27 13:47 ` Pierre Ossman
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.