From: Robert Love <rml@tech9.net>
To: alan@lxorguk.ukuu.org.uk
Cc: anton@samba.org, linux-kernel@vger.kernel.org
Subject: [PATCH] 2.4-ac: migration_thread locking fix
Date: 11 May 2002 09:40:34 -0700 [thread overview]
Message-ID: <1021135234.884.1526.camel@summit> (raw)
[-- Attachment #1: Type: text/plain, Size: 395 bytes --]
Alan,
Anton Blanchard reported a lock vs. interrupt-off ordering bug in
migration_thread. The bug is already fixed in 2.5. A patch is attached
to fix O(1) in your tree.
See the comments above double_rq_lock and double_rq_unlock (which,
sadly, I wrote)! Without this patch there is a possibility to hang,
which Anton observed.
Patch is against 2.4.19-pre8-ac1, please apply.
Robert Love
[-- Attachment #2: sched-irq-fix-rml-2.4.19-pre8-ac1-1.patch --]
[-- Type: text/x-patch, Size: 648 bytes --]
diff -urN linux-2.4.19-pre8-ac1/kernel/sched.c linux/kernel/sched.c
--- linux-2.4.19-pre8-ac1/kernel/sched.c Wed May 8 12:03:14 2002
+++ linux/kernel/sched.c Sat May 11 09:29:55 2002
@@ -1640,8 +1640,8 @@
local_irq_save(flags);
double_rq_lock(rq_src, rq_dest);
if (p->cpu != cpu_src) {
- local_irq_restore(flags);
double_rq_unlock(rq_src, rq_dest);
+ local_irq_restore(flags);
goto repeat;
}
if (rq_src == rq) {
@@ -1651,8 +1651,8 @@
activate_task(p, rq_dest);
}
}
- local_irq_restore(flags);
double_rq_unlock(rq_src, rq_dest);
+ local_irq_restore(flags);
up(&req->sem);
}
next reply other threads:[~2002-05-11 16:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-11 16:40 Robert Love [this message]
2002-05-11 16:46 ` [PATCH] 2.4-ac: migration_thread locking fix Robert Love
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=1021135234.884.1526.camel@summit \
--to=rml@tech9.net \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=anton@samba.org \
--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