From 7fd7ef2936478f58bb576d298f1995dcd4a7068b Mon Sep 17 00:00:00 2001 Message-Id: <7fd7ef2936478f58bb576d298f1995dcd4a7068b.1601675153.git.zanussi@kernel.org> In-Reply-To: <5b5a156f9808b1acf1205606e03da117214549ea.1601675151.git.zanussi@kernel.org> References: <5b5a156f9808b1acf1205606e03da117214549ea.1601675151.git.zanussi@kernel.org> From: Sebastian Andrzej Siewior Date: Mon, 16 Sep 2019 12:33:59 +0200 Subject: [PATCH 297/333] posix-timers: Unlock expiry lock in the early return Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.148-rt64.tar.xz [ 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 Reported-by: Dan Carpenter Reviewed-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Steven Rostedt (VMware) --- 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 765e700962ab..c9964dc3276b 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 -- 2.17.1