Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp1449412rdb; Fri, 19 Jan 2024 22:38:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IHq6O6I+oUVMAFSANRwYuANqBUuaQK0pZ+MRLKuyuM+DupsicntAjVFGwu+hdqJGeR9/X3c X-Received: by 2002:a05:6871:687:b0:210:7ade:ae35 with SMTP id l7-20020a056871068700b002107adeae35mr977898oao.89.1705732705283; Fri, 19 Jan 2024 22:38:25 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705732705; cv=pass; d=google.com; s=arc-20160816; b=gyfzN41hw5P86TRas+d5ONniTXDBNUNkKZOBy5pxA1MJ6cv3AlnuIOhiM1AIe58ihX y+cSpHFy3CTwZf4IoKFdU1JQgWMXXz75B7jxldvqlXdjoITqR/yFQdmcSeMdqGIvFiNl CqJ5W5GQK2jqWtxpyxTQ0QN3aCELfIzvLn4CMHZkhTNg1TwzQC3cfydG17M8XSBA16t4 Ftz7SVj+JKMTMdZpe60jHLPGiY621wc/KBezokdWsNli1dMYtXQcr2T8GEgy1SMaLFKd BsEvqY4aZLdMSL+unedrvVUOYKH2yr8hxmYhAviT1utGjzA67YM6G4rDI421yGWo1duz +jpA== 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=vFw5plvOSy7GDVJyg2km4qJEI/07Ci3wc8MLEDkY+wE=; fh=EE5EXFREXMcr/4CFRrg9be9r5h7+RO/YeraB+U10VHY=; b=ehtFExCuMTO3G4lWWp3MXFo1AF/1PbMnL8TLznxbiGMCVC2TbiddXBVxsX8cEA63a4 OmJA68PfOgXrv0wy7/ZbRCLiXfY7WyCyqNOf3DoIkdAVl41HEr28i5Wo21AlZ3xx7F4Z qnjW/dHxQesQ4uS8ysg9gp5hFmKQCxp7NYRxjYl6zj+8RwV9gSUyaHy7xvjeEF0GQG18 ND4mUIWbfdjxiB1v4IXLbO+9idrOLP5ZdATEZhcsaGE00lDLgFPXWVxamUZ1PzxeYUPQ lxTdMmWbg9py928vFacI/+Q8dGn2HhVrZHfepqV9fi96A8bK5eCMmEXovxw0jgu3GgB8 eqCg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="V29DH/y3"; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-31719-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31719-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id i10-20020a65484a000000b005cdd7fff951si4540437pgs.132.2024.01.19.22.38.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jan 2024 22:38:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-31719-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="V29DH/y3"; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-31719-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31719-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id B3A4F284C86 for ; Sat, 20 Jan 2024 06:38:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E37D520F8; Sat, 20 Jan 2024 06:38:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="V29DH/y3" 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 017FE1FBC; Sat, 20 Jan 2024 06:38:16 +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=1705732697; cv=none; b=BdJo3Hr7ar0rfO4aggaVyEqLDkAuS6S+H7WfA7FrlCvOiSrAeBWnCm5XhcAvNUnBFxCVLri5saln78WV4A/NgvetmM2XGvyIzCF880hZ2H/RFkR4DJikYKlLZZGC7SoLjjO/e10kdlM7fFzAZuXnVGbQVCcw81HLYlmhEji9PBA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705732697; c=relaxed/simple; bh=rT2EYcgKsz++dhLpBSL3G3IRaXCglKctuUgczSDQ2lM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=eH7BV+ap+56C2J721e+9c/s8WI+fkqUiY5lXtb7BFGBt5/jBhW7O3hDibXN0FyI0bNEuokurteBDYtlWkyMw2ws8jH+Xknl2IKC9H/OVOoRGKOs/lATVoB+GQ76E7ewETTL5ScduwwEicmyjmwdyofnylLCLl8VP6rKYSEnZneE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=V29DH/y3; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 07CD8C433C7; Sat, 20 Jan 2024 06:38:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1705732696; bh=rT2EYcgKsz++dhLpBSL3G3IRaXCglKctuUgczSDQ2lM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=V29DH/y30pXGqHh8JSQBJ0EgkPZh7vDDmHGPKIHsHPhqLD2jCWFq085hfGbYviiZS w4MuZMx8/zeUOHM0yCVWsyaQCoR+SNjp9eilB20RyYRLznt2nnQCEVqGeQnzaypI5Y /DXAETBuqnZFb+WNerJu7v6gU3QBN9tbvyyzGack= Date: Sat, 20 Jan 2024 07:38:14 +0100 From: Greg Kroah-Hartman To: Stefan Wiehler Cc: Florian Fainelli , 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: <2024012047-prompter-driveway-c418@gregkh> References: <2024011935-snowman-regain-b820@gregkh> <20240119163811.3884999-1-stefan.wiehler@nokia.com> 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: <20240119163811.3884999-1-stefan.wiehler@nokia.com> 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? thanks, greg k-h