blob: 713ff4847733a1fe60890ddaf83d54a0ddab6e03 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
From a72c480240c6f7cf35fd4cab5093beff1f6e3ee8 Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Mon, 9 Nov 2020 15:54:03 +0100
Subject: [PATCH 021/323] sched: Unlock the rq in affine_move_task() error path
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.215-rt107.tar.xz
Unlock the rq if returned early in the error path.
Reported-by: Joe Korty <joe.korty@concurrent-rt.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Link: https://lkml.kernel.org/r/20201106203921.GA48461@zipoli.concurrent-rt.com
---
kernel/sched/core.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 565d8011c832f..d12d91510789a 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -2228,8 +2228,10 @@ static int affine_move_task(struct rq *rq, struct task_struct *p, struct rq_flag
*
* Either way, we really should have a @pending here.
*/
- if (WARN_ON_ONCE(!pending))
+ if (WARN_ON_ONCE(!pending)) {
+ task_rq_unlock(rq, p, rf);
return -EINVAL;
+ }
if (flags & SCA_MIGRATE_ENABLE) {
--
2.44.0
|