public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Stefan Wiehler <stefan.wiehler@nokia.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>,
	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 <chenhuacai@loongson.cn>,
	Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Subject: Re: [PATCH] mips/smp: Call rcu_cpu_starting() earlier
Date: Sat, 20 Jan 2024 07:38:14 +0100	[thread overview]
Message-ID: <2024012047-prompter-driveway-c418@gregkh> (raw)
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:
>   [<ffffffff8012a434>] show_stack+0x64/0x158
>   [<ffffffff80a93d98>] dump_stack_lvl+0x90/0xc4
>   [<ffffffff801c9e9c>] __lock_acquire+0x1404/0x2940
>   [<ffffffff801cbf3c>] lock_acquire+0x14c/0x448
>   [<ffffffff80aa4260>] _raw_spin_lock_irqsave+0x50/0x88
>   [<ffffffff8021e0c8>] clockevents_register_device+0x60/0x1e8
>   [<ffffffff80130ff0>] r4k_clockevent_init+0x220/0x3a0
>   [<ffffffff801339d0>] 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 <stefan.wiehler@nokia.com>
> Reviewed-by: Huacai Chen <chenhuacai@loongson.cn>
> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
> ---
>  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

  reply	other threads:[~2024-01-20  6:38 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-18 10:48 [PATCH 6.1 000/100] 6.1.74-rc1 review Greg Kroah-Hartman
2024-01-18 11:36 ` Pavel Machek
2024-01-18 18:35 ` SeongJae Park
2024-01-18 19:10 ` Florian Fainelli
2024-01-19  3:52   ` Naresh Kamboju
2024-01-19  5:40   ` Greg Kroah-Hartman
2024-01-19 16:07   ` Stefan Wiehler
2024-01-19 16:10     ` Greg Kroah-Hartman
2024-01-19 16:38       ` [PATCH] mips/smp: Call rcu_cpu_starting() earlier Stefan Wiehler
2024-01-20  6:38         ` Greg Kroah-Hartman [this message]
2024-01-21 16:52           ` Florian Fainelli
2024-01-22 17:07             ` Greg Kroah-Hartman
2024-01-18 20:13 ` [PATCH 6.1 000/100] 6.1.74-rc1 review Sven Joachim
2024-01-19  0:44 ` Shuah Khan
2024-01-19  1:05 ` Allen
2024-01-19  8:59 ` Yann Sionneau
2024-01-19 14:11 ` Jon Hunter
2024-01-20  0:46 ` Ron Economos
2024-01-20  2:18 ` Miguel Ojeda

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2024012047-prompter-driveway-c418@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=akpm@linux-foundation.org \
    --cc=allen.lkml@gmail.com \
    --cc=chenhuacai@loongson.cn \
    --cc=conor@kernel.org \
    --cc=f.fainelli@gmail.com \
    --cc=jonathanh@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=lkft-triage@lists.linaro.org \
    --cc=patches@kernelci.org \
    --cc=patches@lists.linux.dev \
    --cc=pavel@denx.de \
    --cc=rwarsow@gmx.de \
    --cc=shuah@kernel.org \
    --cc=srw@sladewatkins.net \
    --cc=stable@vger.kernel.org \
    --cc=stefan.wiehler@nokia.com \
    --cc=sudipm.mukherjee@gmail.com \
    --cc=torvalds@linux-foundation.org \
    --cc=tsbogend@alpha.franken.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox