Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp791362lqh; Sun, 5 May 2024 02:06:58 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUAjqP8ss9A8k1aqahLSxMzaB7EuVhE5FK/PFoFjWZpbsaKVai+NRUilKvNsdFTmSy7VI9Smek+6OcfArR+O4Je+0emFJTk78TurVofuw== X-Google-Smtp-Source: AGHT+IHAOrF/BtmFj5uZsOfZS53pUfT9VD0Iah37AzHKEDJPDdZ3WneLfZfhloCnuMV82Ita7/Zk X-Received: by 2002:a05:622a:308:b0:43a:e61a:ddde with SMTP id q8-20020a05622a030800b0043ae61adddemr8657807qtw.48.1714900018275; Sun, 05 May 2024 02:06:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714900018; cv=pass; d=google.com; s=arc-20160816; b=kPZO3+VuwkPWwURTzPPp37BpOqs13FbLyXHB1rCxKWCa+wY8S6F0FHUK07Ha8ALUav YsILVvxyM3rkXy8RhXuaOHf4vNImtCaNDN9CPcgteAHzSZoa/wHBEqClSKlBicFVdvj2 fD9dItlF3mioxIA0kVOzSEy0kEpPQgva04C5s9ksjsfi8jqKk0pw2K7aOccehuI88T8t QzH7mB0cSP2gpAcop3KVhUnkzwHEfOIM1ugvOOPxC/7PJd6o3TsLuHz7wSruK5Qkqznm jCxD17EN5Z8uHfnpasexkrZl/UHH3hWxVGqEsKrTBULQ6DdoyIzSQHS9ny+0AJ2/Jv+8 l6uQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-disposition:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:message-id:subject:cc:to:from:date:sender :dkim-signature; bh=NqnhFoMuJwmpFt3ZxxBv08O79AyxDAnpNsiQ/YPbRPA=; fh=x4lWAsMi/nWSvCpfA5md0AxN4C6E1mP0Jr0uuYhA9XE=; b=iArU4CeG1o1+oXSHMKYE45tS4ZEggzSQShrR4b/ywyNmG+xfdwR2Z4JvSGXotIrn/F SEU/cuadBQX3vS7mQsMwlKIWpZCGqpBdENMiv1OBakMk/gNJmOb+9tMB0hcAlzvQNqHE r+LFoTdVEQmTn3xc2VKpPhLmfm+bWfmNegIgrco8QFXshsRg2bR0z+rjxNlj0rkI/Oyz owBLsvMw3JveZAMGoiI49K9W1N5SYpQQGREj/VrzoxxnrRliKOFTDjrvYz45zXuviuXv tWnWAbtFKwasfegJsOaFb50vRrtUZs8dUroV9KOIv9hOggNFg+QyuIOITSF1DUBxZMO3 fT4g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=KaybnDSd; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-168932-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168932-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id j22-20020ac85f96000000b0043ab24a0b17si4584025qta.295.2024.05.05.02.06.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 May 2024 02:06:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-168932-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=KaybnDSd; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-168932-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168932-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 394BB1C209CF for ; Sun, 5 May 2024 09:06:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DA7FEDDBB; Sun, 5 May 2024 09:06:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="KaybnDSd" Received: from mail-ej1-f54.google.com (mail-ej1-f54.google.com [209.85.218.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6C8BD7462 for ; Sun, 5 May 2024 09:06:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714899995; cv=none; b=EkXc5VR1rtw+aHoDugS+4+sWnrZSzPeIsdX2FvPa0NOBZjHj7T1R7tMoiexSODue8Qv2Szr5zEJZL7tKk+G+2bD2NAWI5PsR7OM4s149Y8yCOafF4dE75cCGpEpiSo37Nw0wOFSWPwENLj8iTafE+EgTMRy48PSTZVUlYii5Zu4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714899995; c=relaxed/simple; bh=qdReb408ivPwxm66qLDD4/I7wrw/SuqJSwzuohf9igY=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=Qkp7OCD45K4W1OiyaXfyOmdjh+2+BiNqFt2Z5ZdNIi1oy5fn8QJ/OKd5jnoDL04wALLAD6c1vQAwPXQLCKVgRpNu8TmdLSSKoY+oN547MctZ6x2dyPtO0D9spuj4Ko7KQuHM9/qljXOOg+U0LuoPe3jbtcJHsA2Dp/EGgvwsh3E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=KaybnDSd; arc=none smtp.client-ip=209.85.218.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-f54.google.com with SMTP id a640c23a62f3a-a59ad344f7dso140276166b.0 for ; Sun, 05 May 2024 02:06:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714899992; x=1715504792; darn=vger.kernel.org; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :sender:from:to:cc:subject:date:message-id:reply-to; bh=NqnhFoMuJwmpFt3ZxxBv08O79AyxDAnpNsiQ/YPbRPA=; b=KaybnDSd/uBXJED0gmGhKtAquW6SYWixfrYk5WDh6kF+Z5XL+z5JGLLPNV/TpgN1Je 0313XP/i99CzKH7rejgkLdR9faJVcKcuMgCUEFlcv68mL/mrJDw0JcyNA5XUfqvJ/psz V20VI9iHkkyKTK3YTlEv0yOnJ0dgllTIEWOTcqd2E5QsTN5pTgHNRi+tAudnXLcFQZpg POK65syTtSoTg1js0fmTOml3w7P8pQhBPh7rdcozQ5pPFEFYLVgbW63tagaH7tgy87sR /Djkn340TA3XEE7KSff+P9WRKQ2JpreWmFRqkxX8UvD/7DMtz/9pND0bINFrLGaiVubD DHnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714899992; x=1715504792; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=NqnhFoMuJwmpFt3ZxxBv08O79AyxDAnpNsiQ/YPbRPA=; b=cKyNf9BCO7tLE7eKlZISYKiJJQ+bIdnCoaz5ht4gjXCqCDfQW0S70Z3gxmlbiMuruK rMtYT6KKv0IL5p5PqApUOhymUzLran3LD+unJfpmG7x+uSHNQI11ps2jmdD5pQWW0Jtm bReIe7v6Gm2V1MQO3ArJXA2JQjdPjC9LV37fbqHN2ph47AGJqmHIi2Pb0zdRNbzWwhnN aNi2irDxLhGPiJrkAI8HctJgLBcoN1MJseK+UPG5yB7DOnIFZ8ePihN5IHYZrUmNNoPi sxRPkMJop4srjVk1MJZ33pOZlWWO6o8Gu5bXggTb+QKRA9SE0uXNVsc4/mP5FxipQ+4y sc7w== X-Gm-Message-State: AOJu0Yyl9q20GG8vC/TDrWBRW4BuPjAhufS589b4O9r7RLPYmBDVtUjI K6a/AkIYu8LH2Bw6b6Sv6ysT34n4aFvq7yGGDv0D4FVdgQdftuyW X-Received: by 2002:a50:9ea9:0:b0:572:459f:c7a1 with SMTP id a38-20020a509ea9000000b00572459fc7a1mr4376483edf.16.1714899991310; Sun, 05 May 2024 02:06:31 -0700 (PDT) Received: from gmail.com (1F2EF54C.unconfigured.pool.telekom.hu. [31.46.245.76]) by smtp.gmail.com with ESMTPSA id fj20-20020a0564022b9400b00572336c900asm3797550edb.74.2024.05.05.02.06.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 May 2024 02:06:30 -0700 (PDT) Sender: Ingo Molnar Date: Sun, 5 May 2024 11:06:28 +0200 From: Ingo Molnar To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, Thomas Gleixner , Peter Zijlstra , Andrew Morton , Borislav Petkov , Marc Zyngier Subject: [GIT PULL] IRQ fix Message-ID: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Linus, Please pull the latest irq/urgent Git tree from: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq-urgent-2024-05-05 # HEAD: 1dd1eff161bd55968d3d46bc36def62d71fb4785 softirq: Fix suspicious RCU usage in __do_softirq() Fix suspicious RCU usage in __do_softirq(). Thanks, Ingo ------------------> Zqiang (1): softirq: Fix suspicious RCU usage in __do_softirq() kernel/softirq.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/kernel/softirq.c b/kernel/softirq.c index b315b21fb28c..02582017759a 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c @@ -508,7 +508,7 @@ static inline bool lockdep_softirq_start(void) { return false; } static inline void lockdep_softirq_end(bool in_hardirq) { } #endif -asmlinkage __visible void __softirq_entry __do_softirq(void) +static void handle_softirqs(bool ksirqd) { unsigned long end = jiffies + MAX_SOFTIRQ_TIME; unsigned long old_flags = current->flags; @@ -563,8 +563,7 @@ asmlinkage __visible void __softirq_entry __do_softirq(void) pending >>= softirq_bit; } - if (!IS_ENABLED(CONFIG_PREEMPT_RT) && - __this_cpu_read(ksoftirqd) == current) + if (!IS_ENABLED(CONFIG_PREEMPT_RT) && ksirqd) rcu_softirq_qs(); local_irq_disable(); @@ -584,6 +583,11 @@ asmlinkage __visible void __softirq_entry __do_softirq(void) current_restore_flags(old_flags, PF_MEMALLOC); } +asmlinkage __visible void __softirq_entry __do_softirq(void) +{ + handle_softirqs(false); +} + /** * irq_enter_rcu - Enter an interrupt context with RCU watching */ @@ -921,7 +925,7 @@ static void run_ksoftirqd(unsigned int cpu) * We can safely run softirq on inline stack, as we are not deep * in the task stack here. */ - __do_softirq(); + handle_softirqs(true); ksoftirqd_run_end(); cond_resched(); return;