[PATCH] add missing memory barriers to ipc/sem.c

Two smp_wmb() statements are missing in the sysv sem code: This could
cause stack corruptions.

The attached patch adds them.

Signed-Off-By: Manfred Spraul <manfred@colorfullife.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by Manfred Spraul and committed by Linus Torvalds 6003a93e a7c2491a

+2
+2
ipc/sem.c
··· 381 381 /* hands-off: q will disappear immediately after 382 382 * writing q->status. 383 383 */ 384 + smb_wmb(); 384 385 q->status = error; 385 386 q = n; 386 387 } else { ··· 462 461 n = q->next; 463 462 q->status = IN_WAKEUP; 464 463 wake_up_process(q->sleeper); /* doesn't sleep */ 464 + smp_wmb(); 465 465 q->status = -EIDRM; /* hands-off q */ 466 466 q = n; 467 467 }