[PATCH] RISC-V: fix taking the text_mutex twice during sifive errata patching

Palmer Dabbelt palmer at dabbelt.com
Tue Mar 7 12:38:07 PST 2023


On Tue, 07 Mar 2023 12:17:22 PST (-0800), Conor Dooley wrote:
> On Tue, Mar 07, 2023 at 09:13:01PM +0100, Geert Uytterhoeven wrote:
>> Hi Conor,
>> 
>> On Thu, Mar 2, 2023 at 6:45 PM Conor Dooley <conor at kernel.org> wrote:
>> > From: Conor Dooley <conor.dooley at microchip.com>
>> >
>> > Chris pointed out that some bonehead, *cough* me *cough*, added two
>> > mutex_locks() to the SiFive errata patching. The second was meant to
>> > have been a mutex_unlock().
>> >
>> > Reported-by: Chris Hofstaedtler <zeha at debian.org>
>> > Fixes: 9493e6f3ce02 ("RISC-V: take text_mutex during alternative patching")
>> > Signed-off-by: Conor Dooley <conor.dooley at microchip.com>
>> 
>> Thanks for your patch!
>> 
>> This fixes the crash I see (with "earlycon keep_bootcon") on StarLight,
>> and which I've just bisected to aforementioned commit, so
>> Tested-by: Geert Uytterhoeven <geert+renesas at glider.be>
>> 
>> You may want to include (a part of) the crash log below in your
>> patch description, to make it easier for affected people to find
>> the fix.
>
> There was no crash log when Chris pointed it out on IRC & I never asked
> if they had hit it in a running system.
> If there's a v2 for whatever reason, I'll incorporate the splat.
> Apologies for the inconvenience caused by my boneheadedness!
> I'd hoped that this would make Palmer's second PR, but it was not to
> be :(

Sorry about that, there was just too much going on in the second half of 
the merge window and I was trying to dig through stuff.  I'd actually 
though you were talking about the other mutex patch (the text_mutex one) 
when you pinged it, I forgot there were two.

I just queued this up, it's testing but I doubt it'll trip anything.  It 
should be in fixes soon.



More information about the linux-riscv mailing list