blob: 96ecc00c4c26599fb6fabe6ad3a0579bf4a05966 (
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
35
36
37
|
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Mon, 16 Sep 2019 12:33:59 +0200
Subject: [PATCH 296/353] posix-timers: Unlock expiry lock in the early return
Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=0b7d81f87d3b22d47b2b96b9e2f3fa22a11e2097
[ Upstream commit 356a2781375ec58521a9bc3f500488745990c242 ]
Patch ("posix-timers: Add expiry lock") acquired a lock in
run_posix_cpu_timers() but didn't drop the lock in the early return.
Unlock the lock in the early return path.
Reported-by: kbuild test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
kernel/time/posix-cpu-timers.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/kernel/time/posix-cpu-timers.c b/kernel/time/posix-cpu-timers.c
index 54632ed51c65..b9e4ccbb60f3 100644
--- a/kernel/time/posix-cpu-timers.c
+++ b/kernel/time/posix-cpu-timers.c
@@ -1175,8 +1175,10 @@ static void __run_posix_cpu_timers(struct task_struct *tsk)
expiry_lock = this_cpu_ptr(&cpu_timer_expiry_lock);
spin_lock(expiry_lock);
- if (!lock_task_sighand(tsk, &flags))
+ if (!lock_task_sighand(tsk, &flags)) {
+ spin_unlock(expiry_lock);
return;
+ }
/*
* Here we take off tsk->signal->cpu_timers[N] and
* tsk->cpu_timers[N] all the timers that are firing, and
|