aboutsummaryrefslogtreecommitdiffstats
path: root/ipc
diff options
context:
space:
mode:
Diffstat (limited to 'ipc')
-rw-r--r--ipc/sem.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ipc/sem.c b/ipc/sem.c
index 19af028a3e38..6a16f8edf2b2 100644
--- a/ipc/sem.c
+++ b/ipc/sem.c
@@ -381,6 +381,7 @@ static void update_queue (struct sem_array * sma)
381 /* hands-off: q will disappear immediately after 381 /* hands-off: q will disappear immediately after
382 * writing q->status. 382 * writing q->status.
383 */ 383 */
384 smb_wmb();
384 q->status = error; 385 q->status = error;
385 q = n; 386 q = n;
386 } else { 387 } else {
@@ -461,6 +462,7 @@ static void freeary (struct sem_array *sma, int id)
461 n = q->next; 462 n = q->next;
462 q->status = IN_WAKEUP; 463 q->status = IN_WAKEUP;
463 wake_up_process(q->sleeper); /* doesn't sleep */ 464 wake_up_process(q->sleeper); /* doesn't sleep */
465 smp_wmb();
464 q->status = -EIDRM; /* hands-off q */ 466 q->status = -EIDRM; /* hands-off q */
465 q = n; 467 q = n;
466 } 468 }