Re: Spinlock can be released twice in procsignal.c

Andrey Borodin <x4mmm@yandex-team.ru>

From: Andrey Borodin <x4mmm@yandex-team.ru>
To: Maxim Orlov <orlovmg@gmail.com>
Cc: Michael Paquier <michael@paquier.xyz>, "Maksim.Melnikov" <m.melnikov@postgrespro.ru>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Heikki Linnakangas <hlinnaka@iki.fi>, Jelte Fennema-Nio <postgres@jeltef.nl>
Date: 2025-02-26T08:25:49Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Fix possible double-release of spinlock in procsignal.c

Michael, thanks a lot for the detailed explanation.

> On 26 Feb 2025, at 11:57, Maxim Orlov <orlovmg@gmail.com> wrote:
> 
> Indeed. PFA the correct one.
> 
> <v2-0001-Avoid-double-spinlock-release.patch>

I’d suggest to give some more descriptive name to “logit” and expand comment “/* sanity check */“. This comment was easier to understand when elog() was near, but now IMO we can have few words about what is going on.


Best regards, Andrey Borodin.