Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1341033

Re: [STABLE] kernel oops which can be fixed by peterz's patches

From Ben Hutchings <ben@decadent.org.uk>
Newsgroups linux.kernel
Subject Re: [STABLE] kernel oops which can be fixed by peterz's patches
Date 2016-02-23 22:10 +0100
Message-ID <r5snx-2CU-41@gated-at.bofh.it> (permalink)
References (5 earlier) <r2RV8-2Cc-3@gated-at.bofh.it> <r2Y0x-6P7-3@gated-at.bofh.it> <r2YtA-70p-7@gated-at.bofh.it> <r2ZIZ-7Yf-1@gated-at.bofh.it> <r30F4-d2-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On Wed, 2016-02-17 at 04:02 +0100, Mike Galbraith wrote:
[...]

@stable: Kernels that predate SCHED_DEADLINE can use this simple (and tested)
check in lieu of backport of the full 18 patch mainline treatment.

Signed-off-by: Mike Galbraith <umgwanakikbuti@gmail.com>
---
 kernel/sched/fair.c |    9 +++++++++
 1 file changed, 9 insertions(+)

--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -4008,6 +4008,7 @@ int can_migrate_task(struct task_struct
 	 * 2) cannot be migrated to this CPU due to cpus_allowed, or
 	 * 3) running (obviously), or
 	 * 4) are cache-hot on their current CPU.
+	 * 5) p->pi_lock is held.
 	 */
 	if (throttled_lb_pair(task_group(p), env->src_cpu, env->dst_cpu))
 		return 0;
@@ -4049,6 +4050,14 @@ int can_migrate_task(struct task_struct
 	}
 
 	/*
+	 * rt -> fair class change may be in progress.  If we sneak in should
+	 * double_lock_balance() release rq->lock, and move the task, we will
+	 * cause switched_to_fair() to meet a passed but no longer valid rq.
+	 */
+	if (raw_spin_is_locked(&p->pi_lock))
+		return 0;
+
+	/*
 	 * Aggressive migration if:
 	 * 1) task is cache cold, or
 	 * 2) too many balance attempts have failed.



Queued up for 3.2, thanks.

Ben.

-- 
Ben Hutchings
Any smoothly functioning technology is indistinguishable from a rigged demo.
-- 
Ben Hutchings
Any smoothly functioning technology is indistinguishable from a rigged demo.

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [STABLE] kernel oops which can be fixed by peterz's patches Ben Hutchings <ben@decadent.org.uk> - 2016-02-23 22:10 +0100

csiph-web