From: Daniel Walker <dwalker@mvista.com>
To: mingo@elte.hu
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Kevin Hilman <khilman@mvista.com>
Cc: linux-rt-users@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] fix workqueue plist init to include a spinlock
Date: Tue, 29 Jan 2008 09:04:18 -0800 [thread overview]
Date: Tue, 29 Jan 2008 09:02:30 -0800 [thread overview]
Message-ID: <20080129170418.441437926@mvista.com> (raw)
Message-ID: <20080129170230.209662753@mvista.com> (raw)
The lock field in plist_head_init() is used for debugging the plist,
and if a NULL is sent in it spews constant errors with debugging enabled ..
So I added what looks like the correct spinlocks into the plist_head_init().
Signed-off-by: Daniel Walker <dwalker@mvista.com>
---
kernel/workqueue.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: linux-2.6.24/kernel/workqueue.c
===================================================================
--- linux-2.6.24.orig/kernel/workqueue.c
+++ linux-2.6.24/kernel/workqueue.c
@@ -415,7 +415,7 @@ static void insert_wq_barrier(struct cpu
INIT_WORK(&barr->work, wq_barrier_func);
__set_bit(WORK_STRUCT_PENDING, work_data_bits(&barr->work));
- plist_head_init(&barr->worklist, NULL);
+ plist_head_init(&barr->worklist, &cwq->lock);
plist_head_splice(&cwq->worklist, &barr->worklist);
barr->cwq = cwq;
init_completion(&barr->done);
@@ -845,7 +845,7 @@ init_cpu_workqueue(struct workqueue_stru
cwq->wq = wq;
spin_lock_init(&cwq->lock);
- plist_head_init(&cwq->worklist, NULL);
+ plist_head_init(&cwq->worklist, &cwq->lock);
init_waitqueue_head(&cwq->more_work);
cwq->barrier = NULL;
init_waitqueue_head(&cwq->work_done);
--
--
reply other threads:[~2008-01-29 17:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20080129170418.441437926@mvista.com \
--to=dwalker@mvista.com \
--cc=a.p.zijlstra@chello.nl \
--cc=mingo@elte.hu \
/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®