From: Jarkko Lavinen <jlavi@iki.fi>
To: linux-mtd@lists.infradead.org
Subject: complete_and_exit() problem
Date: Mon, 3 Sep 2001 15:58:42 +0300 [thread overview]
Message-ID: <20010903155842.A19349@kosh.hut.fi> (raw)
The garbage collection thread crashes when I unmount JFFS2. The filesystem
is empry and I only mount it and then unmount it. I am using kernel
2.4.8ac12 with rmk1 patch for ARM cpu.
I traced the exeution to complete_and_exit(), then to complete(), then
to __wake_up_common(). In __wake_up_common() there is a loop
list_for_each(tmp,&q->task_list) {
unsigned int state;
wait_queue_t *curr = list_entry(tmp, wait_queue_t, task_list);
CHECK_MAGIC(curr->__magic);
p = curr->task;
state = p->state;
if (state & mode) {
WQ_NOTE_WAKER(curr);
if (try_to_wake_up(p, sync) && (curr->flags&WQ_FLAG_EXCL
USIVE) && !--nr_exclusive)
break;
}
}
When entering the loop, the list q->task_list contains no task.
q->task_list.next and q->task_lis.prev are null pointers.
list_for_each() checks the end of list by comparing against the
list head (q->task_list), not NULL.
I tried replacing
- if (comp)
+ if (comp && comp->wait.task_list.next)
in complete_and_exit(). I don't know if it is the right way to do it,
but at least the garbage gollection thread stopped crashing.
Jarkko Lavinen
next reply other threads:[~2001-09-03 13:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-09-03 12:58 Jarkko Lavinen [this message]
2001-09-04 8:25 ` complete_and_exit() problem David Woodhouse
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=20010903155842.A19349@kosh.hut.fi \
--to=jlavi@iki.fi \
--cc=linux-mtd@lists.infradead.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