From patchwork Fri Jan 17 17:41:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 213274 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 52E9CC33C9E for ; Fri, 17 Jan 2020 17:43:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 27CB024691 for ; Fri, 17 Jan 2020 17:43:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729409AbgAQRnE (ORCPT ); Fri, 17 Jan 2020 12:43:04 -0500 Received: from mail.kernel.org ([198.145.29.99]:40136 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729126AbgAQRla (ORCPT ); Fri, 17 Jan 2020 12:41:30 -0500 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 47CAF24656; Fri, 17 Jan 2020 17:41:30 +0000 (UTC) Received: from rostedt by gandalf.local.home with local (Exim 4.93) (envelope-from ) id 1isVcf-000QSH-6m; Fri, 17 Jan 2020 12:41:29 -0500 Message-Id: <20200117174129.076462344@goodmis.org> User-Agent: quilt/0.65 Date: Fri, 17 Jan 2020 12:41:23 -0500 From: Steven Rostedt To: linux-kernel@vger.kernel.org, linux-rt-users Cc: Thomas Gleixner , Carsten Emde , Sebastian Andrzej Siewior , John Kacur , Julia Cartwright , Daniel Wagner , Tom Zanussi , kbuild test robot , Dan Carpenter Subject: [PATCH RT 12/32] posix-timers: Unlock expiry lock in the early return References: <20200117174111.282847363@goodmis.org> MIME-Version: 1.0 Sender: linux-rt-users-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rt-users@vger.kernel.org 4.19.94-rt39-rc1 stable review patch. If anyone has any objections, please let me know. ------------------ From: Sebastian Andrzej Siewior [ 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