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


Groups > linux.kernel > #1341033 > unrolled thread

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

Started byBen Hutchings <ben@decadent.org.uk>
First post2016-02-23 22:10 +0100
Last post2016-02-23 22:10 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

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

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

FromBen Hutchings <ben@decadent.org.uk>
Date2016-02-23 22:10 +0100
SubjectRe: [STABLE] kernel oops which can be fixed by peterz's patches
Message-ID<r5snx-2CU-41@gated-at.bofh.it>

[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.

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web