From nobody Thu Feb 12 09:15:49 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 50857C77B61 for ; Tue, 25 Apr 2023 18:49:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234834AbjDYSte (ORCPT ); Tue, 25 Apr 2023 14:49:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44756 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234665AbjDYStM (ORCPT ); Tue, 25 Apr 2023 14:49:12 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F111B14F43 for ; Tue, 25 Apr 2023 11:49:09 -0700 (PDT) Message-ID: <20230425183313.249063953@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1682448548; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=Sx10pK8BcTlPxWuC2UdyTLoJxTd/hzNVWxOXwJTCI1U=; b=oVYfclpJ4lXKyc1Bv0jWCtlJnHFR794oSAq6ZcvZ6asVYXISjUvO0tN93BYtwSO12YAd21 MiA5UkB41+BZuAcVdlwhCozJ6bxIb8u0daak4y8sWpeW++b+jPuLhnXj9Xb4IjzSLadoEI eXo3aZ+rMSBfX2vYolhSI2ddy6fTkjTiyl8Zp/rL/IBs4vWg2EgqF7hBomKS3iAc/SekNQ louWpCkTkZ7BFVTcBJAlCAttj+oMMxOd3MCoD+zZdAw/LRmUrQfE2CyJFXtjmsTYLXa2hj gYsPjfalmaSX9INSBITMwbcm9yqSXJMDcpkUprqvvL0cWJ8Y1Z1Kr5yxTDLIeQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1682448548; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=Sx10pK8BcTlPxWuC2UdyTLoJxTd/hzNVWxOXwJTCI1U=; b=fJxM40v2se4bAIg7K9hcBCTFrE3LoyTK2ertCWxBDpVMTKPMPr3GAupe6nWQ1401iGOGSE 87AUOcaZkmXy4WDQ== From: Thomas Gleixner To: LKML Cc: Frederic Weisbecker , Anna-Maria Behnsen , Peter Zijlstra , Sebastian Siewior , syzbot+5c54bd3eb218bb595aa9@syzkaller.appspotmail.com, Dmitry Vyukov , Michael Kerrisk Subject: [patch 08/20] posix-timers: Remove pointless irqsafe from hash_lock References: <20230425181827.219128101@linutronix.de> MIME-Version: 1.0 Date: Tue, 25 Apr 2023 20:49:08 +0200 (CEST) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" All usage of hash_lock is in thread context. No point in using spin_lock_irqsave()/irqrestore() for a single usage site. Signed-off-by: Thomas Gleixner Reviewed-by: Frederic Weisbecker --- kernel/time/posix-timers.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) --- a/kernel/time/posix-timers.c +++ b/kernel/time/posix-timers.c @@ -470,10 +470,9 @@ static void k_itimer_rcu_free(struct rcu static void release_posix_timer(struct k_itimer *tmr, int it_id_set) { if (it_id_set) { - unsigned long flags; - spin_lock_irqsave(&hash_lock, flags); + spin_lock(&hash_lock, flags); hlist_del_rcu(&tmr->t_hash); - spin_unlock_irqrestore(&hash_lock, flags); + spin_unlock(&hash_lock, flags); } put_pid(tmr->it_pid); sigqueue_free(tmr->sigq);