Received: by 2002:a05:7412:7c14:b0:fa:6e18:a558 with SMTP id ii20csp473984rdb; Mon, 22 Jan 2024 09:45:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IGtyK9xD1hzc33efhoeyXq2NoHF2nqBR99fTqzGLjdvrOBugcMlhXldsA4hZlsuLrszbcro X-Received: by 2002:a05:6402:70b:b0:55c:58fd:c254 with SMTP id w11-20020a056402070b00b0055c58fdc254mr290957edx.14.1705945555641; Mon, 22 Jan 2024 09:45:55 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705945555; cv=pass; d=google.com; s=arc-20160816; b=ZNDYC9Zd04tkxN4wf5jnFAVbK5/fielO9SRZldyTiM0lu8+zBBrWXGum6h2UgBD4lV dD5qem671CLE/yKhjpBuwUqWsDKlgdu842+hKYIryvYLVrziN4QUzi2XuoTqPr7u/YLi 7LKbISFhIuwTb9UoYtd962ozm3jhJO4uGLZ+kybJ3qCHT7LTu24+k6nEkXXwrHaciCkW c3W4oenCn+8ODWk+17GcHo5+5IrAujyHNVIgH2T6PBSGZwKQWuEFh3jlkKWTCpHDDJ/F fDapj/uhXiK0zbGSWM26GhQX0lELSsnaxsUsVuF7iwhkkgqFlkCqXA75D9j8fppNmNje dofQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=47VDkwVExs36+/8CNbyA8Kf5XjaUQXPSMcRs8D7TfsA=; fh=Sq1koZDNAn76v/hn+DTxj6eynGeUEaUwhcIOgtRwsYA=; b=zh24bRzYpL3KISzkPhA/QItBUFQmMMI3R0lPXqst0R5HnDcoE7vfReyNsVuALmS27o tt6KcX3pUPl6n1rSA/yKMWFZK6Vz2NyMlZMdotg5m2ku5fVFcprreCAmQwbLngyiTjgx tq+1i6gSI1x+zTcMT1UD76zOgvH0FO3+cJehc6ceRW+Vha77vTFToZmw7mGsI1kCQpxd NxR3H+13owgp7nCUFlG/amngKkO88P0QbE/5ujILn4YoPoyH+2LRHXZDkqJze2KODbYR AhCDc/548ZEFMIJeazJPgXA96COgxlNsG6xGCj2CARzf5iDcXklGTJ/ySC+A+VJ1dQ6P ABVQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="vfju6/uT"; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-33751-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-33751-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id c20-20020a05640227d400b0055b0e93e0fcsi2501050ede.228.2024.01.22.09.45.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 09:45:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-33751-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="vfju6/uT"; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-33751-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-33751-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 6A41C1F274D8 for ; Mon, 22 Jan 2024 17:45:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4F2133DB8F; Mon, 22 Jan 2024 17:07:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="vfju6/uT" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5F98C3D99F; Mon, 22 Jan 2024 17:07:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705943251; cv=none; b=Vbl8vNUryzhRAzZI8+kG9Oltg2/As6XVu5aBY6lg58yA/Q++cVDUB5Q1eAvz15X4s8FLmwOyx7v3C6unR0l/+h0Y1ZGn9cR66Boj5I8Y/nRlzz4DNd3O3x7t0oXWE6VywUX5X0ih4tSPfxzJu9QQ2l3w8IzCqpJOzt3M7LyrKB4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705943251; c=relaxed/simple; bh=+JZz32rW4JTCFtXIffKZnVlpE+3nMpJ5etJGZvkKUt8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Xbj4sI4LXUMBKJkV6F+rrjLFIWTZe2Spjc9AoZpeXAgOhsQup+L/tVaRQvbx9e0JJS4ZqdRmFHLR2P90mKLH6IYbSyAbmEXA2bYsC65HqHSMICUB3bp71jGs/8yJpEWwixH5FPtGX0edRpgxAHyQV4U/nG5a4vxrX2VKc5odcPQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=vfju6/uT; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0E083C433F1; Mon, 22 Jan 2024 17:07:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1705943251; bh=+JZz32rW4JTCFtXIffKZnVlpE+3nMpJ5etJGZvkKUt8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=vfju6/uTQDFy/inOO9Cv8BylCzmPH+WOUs2vKtKq+86zr9Iic/k0ivgFtFVKMEoBM z/wP15XKNngZzQbsiw/FTySNTZfYIYbriqSONjALL2bQb8cM7jRUX5vWnq1tqOl0Ha WSwmIc1v5GQXReigkzAOvcuAWPZ8G3J2UJ5usaUw= Date: Mon, 22 Jan 2024 09:07:28 -0800 From: Greg Kroah-Hartman To: Florian Fainelli Cc: Stefan Wiehler , stable@vger.kernel.org, patches@lists.linux.dev, linux-kernel@vger.kernel.org, torvalds@linux-foundation.org, akpm@linux-foundation.org, linux@roeck-us.net, shuah@kernel.org, patches@kernelci.org, lkft-triage@lists.linaro.org, pavel@denx.de, jonathanh@nvidia.com, sudipm.mukherjee@gmail.com, srw@sladewatkins.net, rwarsow@gmx.de, conor@kernel.org, allen.lkml@gmail.com, Huacai Chen , Thomas Bogendoerfer Subject: Re: [PATCH] mips/smp: Call rcu_cpu_starting() earlier Message-ID: <2024012219-retiring-superbowl-1570@gregkh> References: <2024011935-snowman-regain-b820@gregkh> <20240119163811.3884999-1-stefan.wiehler@nokia.com> <2024012047-prompter-driveway-c418@gregkh> 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 In-Reply-To: On Sun, Jan 21, 2024 at 08:52:55AM -0800, Florian Fainelli wrote: > > > On 1/19/2024 10:38 PM, Greg Kroah-Hartman wrote: > > On Fri, Jan 19, 2024 at 05:38:11PM +0100, Stefan Wiehler wrote: > > > rcu_cpu_starting() must be called before clockevents_register_device() to avoid > > > the following lockdep splat triggered by calling list_add() when > > > CONFIG_PROVE_RCU_LIST=y: > > > > > > WARNING: suspicious RCU usage > > > ... > > > ----------------------------- > > > kernel/locking/lockdep.c:3680 RCU-list traversed in non-reader section!! > > > > > > other info that might help us debug this: > > > > > > RCU used illegally from offline CPU! > > > rcu_scheduler_active = 1, debug_locks = 1 > > > no locks held by swapper/1/0. > > > ... > > > Call Trace: > > > [] show_stack+0x64/0x158 > > > [] dump_stack_lvl+0x90/0xc4 > > > [] __lock_acquire+0x1404/0x2940 > > > [] lock_acquire+0x14c/0x448 > > > [] _raw_spin_lock_irqsave+0x50/0x88 > > > [] clockevents_register_device+0x60/0x1e8 > > > [] r4k_clockevent_init+0x220/0x3a0 > > > [] start_secondary+0x50/0x3b8 > > > > > > raw_smp_processor_id() is required in order to avoid calling into lockdep > > > before RCU has declared the CPU to be watched for readers. > > > > > > See also commit 29368e093921 ("x86/smpboot: Move rcu_cpu_starting() earlier"), > > > commit de5d9dae150c ("s390/smp: move rcu_cpu_starting() earlier") and commit > > > 99f070b62322 ("powerpc/smp: Call rcu_cpu_starting() earlier"). > > > > > > Signed-off-by: Stefan Wiehler > > > Reviewed-by: Huacai Chen > > > Signed-off-by: Thomas Bogendoerfer > > > --- > > > arch/mips/kernel/smp.c | 4 ++-- > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > What is the git commit id of this change in Linus's tree? What > > kernel(s) should this be applied to? > > The upstream commit is 55702ec9603ebeffb15e6f7b113623fe1d8872f4 ("mips/smp: > Call rcutree_report_cpu_starting() earlier") and this change from Stefan > should be applied to both the 6.1 stable and 6.6 stable branches. Thanks! Thanks, now queued up. greg k-h