git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 3b37a6d) | patch
Fix deadlock danger when atomic ops are done under spinlock.
Mon, 8 Jun 2020 23:50:37 +0000 (16:50 -0700)
2020年6月18日 21:08:32 +0000 (14:08 -0700)
commit cf1234a10e50ff9be0dc85184689ee4ebc57cd77
Fix deadlock danger when atomic ops are done under spinlock.

This was a danger only for --disable-spinlocks in combination with
atomic operations unsupported by the current platform.

While atomics.c was careful to signal that a separate semaphore ought
to be used when spinlock emulation is active, spin.c didn't actually
implement that mechanism. That's my (Andres') fault, it seems to have
gotten lost during the development of the atomic operations support.

Fix that issue and add test for nesting atomic operations inside a
spinlock.

Author: Andres Freund
Discussion: https://postgr.es/m/20200605023302.g6v3ydozy5txifji@alap3.anarazel.de
Backpatch: 9.5-
src/backend/storage/lmgr/spin.c diff | blob | blame | history
src/test/regress/regress.c diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /