blob: bc78d7729fea7c471f8be5ab8bae908aa3345230 (
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 9a34ae4ec3b4af5cc98c8405ea590096a1380af9 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.204-rt100.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 565d8011c832..d12d91510789 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.43.0
|