Re: Spinlock can be released twice in procsignal.c
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Maxim Orlov <orlovmg@gmail.com>
Cc: Andrey Borodin <x4mmm@yandex-team.ru>, "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-27T00:46: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 →
-
Fix possible double-release of spinlock in procsignal.c
- 62ec3e1f6786 18.0 landed
On Wed, Feb 26, 2025 at 12:33:16PM +0300, Maxim Orlov wrote: > Done. Except for a new name for "logit" variable. Unfortunately, I can't > think of anything sane. As an example I looked at sequence.c. The same name > is used there. I will gladly change this name to whatever you want if it > still look misleading or incomplete for you in some way or another. Just > write the name that you think is correct. "old_pss_pid", because this is an old pss_pid value from a previous slot. Keeping the value around after releasing the slot is also useful for debugging, so rather than a boolean it is possible to use a uint32. The "sanity check" comment was also a bit out-of-order because it was written just before acquiring the spinlock. Tweaked a bit the whole, and the result looked OK so applied on HEAD. -- Michael