1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

MDEV-7026 - Race in InnoDB/XtraDB mutex implementation can stall or hang the

server

This is an addition to original patch. Added full memory barrier to ensure
proper StoreLoad order between waiters and lock_word on PPC64.
This commit is contained in:
Sergey Vojtovich
2014-11-21 15:23:18 +04:00
parent b0febdb66e
commit 4472a0ef95
2 changed files with 10 additions and 0 deletions

View File

@@ -593,6 +593,11 @@ spin_loop:
mutex_set_waiters(mutex, 1);
/* Make sure waiters store won't pass over mutex_test_and_set */
#ifdef __powerpc__
os_mb;
#endif
/* Try to reserve still a few times */
for (i = 0; i < 4; i++) {
if (mutex_test_and_set(mutex) == 0) {

View File

@@ -588,6 +588,11 @@ spin_loop:
mutex_set_waiters(mutex, 1);
/* Make sure waiters store won't pass over mutex_test_and_set */
#ifdef __powerpc__
os_mb;
#endif
/* Try to reserve still a few times */
for (i = 0; i < 4; i++) {
if (mutex_test_and_set(mutex) == 0) {