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:
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user