Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: Conor Dooley <conor.dooley@microchip.com>
To: Sasha Levin <sashal@kernel.org>
Cc: Conor Dooley <conor@kernel.org>, <stable@vger.kernel.org>,
	<palmer@dabbelt.com>, Guenter Roeck <linux@roeck-us.net>
Subject: Re: [PATCH 6.1 v1] RISC-V: fix lock splat in riscv_cpufeature_patch_func()
Date: Fri, 12 May 2023 08:03:06 +0100	[thread overview]
Message-ID: <20230512-reversion-spotter-7b1b49707100@wendy> (raw)
In-Reply-To: <ZF18raXiQKGbxl76@sashalap>

[-- Attachment #1: Type: text/plain, Size: 1409 bytes --]

On Thu, May 11, 2023 at 07:39:25PM -0400, Sasha Levin wrote:
> On Tue, May 09, 2023 at 10:36:42PM +0100, Conor Dooley wrote:
> > From: Conor Dooley <conor.dooley@microchip.com>
> > 
> > Guenter reported a lockdep splat that appears to have been present for a
> > while in v6.1.y & the backports of the riscv_patch_in_stop_machine dance
> > did nothing to help here, as the lock is not being taken when
> > patch_text_nosync() is called in riscv_cpufeature_patch_func().
> > Add the lock/unlock; elide the splat.
> 
> Is this not a problem upstream?

It is not. Nor is it a problem in 6.2 either.
In fact, looking at it at a time other than 22h30, I notice that this is
not a complete patch. Instead we need to backport commit 9493e6f3ce02
("RISC-V: take text_mutex during alternative patching") and bf89b7ee52af
("RISC-V: fix taking the text_mutex twice during sifive errata patching")
to 6.1. The automagic version failed:
https://lore.kernel.org/stable/a2a21e9c-41ec-46dd-b792-6314c5fa4241@spud/

And I was of the opinion that this was not needed for kernels without
commit 702e64550b12 ("riscv: fpu: switch has_fpu() to
riscv_has_extension_likely()").

I'll go send those now, I am surprised noone has complained about the
SiFive errata causing a splat, but I guess noone with that hardware is
testing stable. The T-HEAD errata has no functional users in 6.1.

Thanks,
Conor.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2023-05-12  7:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-09 21:36 [PATCH 6.1 v1] RISC-V: fix lock splat in riscv_cpufeature_patch_func() Conor Dooley
2023-05-11 23:39 ` Sasha Levin
2023-05-12  7:03   ` Conor Dooley [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-05-10 20:40 Guenter Roeck

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=20230512-reversion-spotter-7b1b49707100@wendy \
    --to=conor.dooley@microchip.com \
    --cc=conor@kernel.org \
    --cc=linux@roeck-us.net \
    --cc=palmer@dabbelt.com \
    --cc=sashal@kernel.org \
    --cc=stable@vger.kernel.org \
    /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