From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org,
linux-rt-users <linux-rt-users@vger.kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Carsten Emde <C.Emde@osadl.org>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
John Kacur <jkacur@redhat.com>,
Paul Gortmaker <paul.gortmaker@windriver.com>,
Mike Galbraith <umgwanakikbuti@gmail.com>,
<stable-rt@vger.kernel.org>
Subject: [PATCH RT 4/5] hotplug: Use set_cpus_allowed_ptr() in sync_unplug_thread()
Date: Thu, 14 May 2015 09:59:40 -0400 [thread overview]
Message-ID: <20150514140001.344824412@goodmis.org> (raw)
In-Reply-To: 20150514135936.609231479@goodmis.org
[-- Attachment #1: 0004-hotplug-Use-set_cpus_allowed_ptr-in-sync_unplug_thre.patch --]
[-- Type: text/plain, Size: 2129 bytes --]
3.14.39-rt38-rc1 stable review patch.
If anyone has any objections, please let me know.
------------------
From: Mike Galbraith <umgwanakikbuti@gmail.com>
do_set_cpus_allowed() is not safe vs ->sched_class change.
crash> bt
PID: 11676 TASK: ffff88026f979da0 CPU: 22 COMMAND: "sync_unplug/22"
#0 [ffff880274d25bc8] machine_kexec at ffffffff8103b41c
#1 [ffff880274d25c18] crash_kexec at ffffffff810d881a
#2 [ffff880274d25cd8] oops_end at ffffffff81525818
#3 [ffff880274d25cf8] do_invalid_op at ffffffff81003096
#4 [ffff880274d25d90] invalid_op at ffffffff8152d3de
[exception RIP: set_cpus_allowed_rt+18]
RIP: ffffffff8109e012 RSP: ffff880274d25e48 RFLAGS: 00010202
RAX: ffffffff8109e000 RBX: ffff88026f979da0 RCX: ffff8802770cb6e8
RDX: 0000000000000000 RSI: ffffffff81add700 RDI: ffff88026f979da0
RBP: ffff880274d25e78 R8: ffffffff816112e0 R9: 0000000000000001
R10: 0000000000000001 R11: 0000000000011940 R12: ffff88026f979da0
R13: ffff8802770cb6d0 R14: ffff880274d25fd8 R15: 0000000000000000
ORIG_RAX: ffffffffffffffff CS: 0010 SS: 0018
#5 [ffff880274d25e60] do_set_cpus_allowed at ffffffff8108e65f
#6 [ffff880274d25e80] sync_unplug_thread at ffffffff81058c08
#7 [ffff880274d25ed8] kthread at ffffffff8107cad6
#8 [ffff880274d25f50] ret_from_fork at ffffffff8152bbbc
crash> task_struct ffff88026f979da0 | grep class
sched_class = 0xffffffff816111e0 <fair_sched_class+64>,
Signed-off-by: Mike Galbraith <umgwanakikbuti@gmail.com>
Cc: stable-rt@vger.kernel.org
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
kernel/cpu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/cpu.c b/kernel/cpu.c
index 285e18b2c420..a3890754e407 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -242,7 +242,7 @@ static int sync_unplug_thread(void *data)
* we don't want any more work on this CPU.
*/
current->flags &= ~PF_NO_SETAFFINITY;
- do_set_cpus_allowed(current, cpu_present_mask);
+ set_cpus_allowed_ptr(current, cpu_present_mask);
migrate_me();
return 0;
}
--
2.1.4
next prev parent reply other threads:[~2015-05-14 13:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-14 13:59 [PATCH RT 0/5] Linux 3.14.39-rt38-rc1 Steven Rostedt
2015-05-14 13:59 ` [PATCH RT 1/5] kernel/irq_work: fix no_hz deadlock Steven Rostedt
2015-05-14 13:59 ` [PATCH RT 2/5] KVM: lapic: mark LAPIC timer handler as irqsafe Steven Rostedt
2015-05-14 13:59 ` [PATCH RT 3/5] KVM: use simple waitqueue for vcpu->wq Steven Rostedt
2015-05-14 13:59 ` Steven Rostedt [this message]
2015-05-14 13:59 ` [PATCH RT 5/5] Linux 3.14.39-rt38-rc1 Steven Rostedt
2015-05-19 15:46 ` [PATCH RT 0/5] " Muli Baron
2015-05-20 2:51 ` Steven Rostedt
2015-05-20 2:56 ` [PATCH RT] rt, nohz_full: fix nohz_full for PREEMPT_RT_FULL Steven Rostedt
-- strict thread matches above, loose matches on Subject: below --
2015-05-14 14:01 [PATCH RT 0/5] Linux 3.12.40-rt56-rc1 Steven Rostedt
2015-05-14 14:01 ` [PATCH RT 4/5] hotplug: Use set_cpus_allowed_ptr() in sync_unplug_thread() Steven Rostedt
2015-05-14 14:02 [PATCH RT 0/5] Linux 3.10.75-rt81-rc1 Steven Rostedt
2015-05-14 14:02 ` [PATCH RT 4/5] hotplug: Use set_cpus_allowed_ptr() in sync_unplug_thread() Steven Rostedt
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=20150514140001.344824412@goodmis.org \
--to=rostedt@goodmis.org \
--cc=C.Emde@osadl.org \
--cc=bigeasy@linutronix.de \
--cc=jkacur@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=paul.gortmaker@windriver.com \
--cc=stable-rt@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=umgwanakikbuti@gmail.com \
/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 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.