diff options
author | Manfred Spraul <manfred@colorfullife.com> | 2005-12-23 23:57:41 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-12-24 12:13:27 -0800 |
commit | 6003a93e7bf6c02f33c02976ff364785d4273295 (patch) | |
tree | c81c159d6b04f9bffcf9984d5259eb0448683f7d /ipc | |
parent | a7c2491a13cc72fc09c062e635b9a77ff6bb4a73 (diff) | |
download | op-kernel-dev-6003a93e7bf6c02f33c02976ff364785d4273295.zip op-kernel-dev-6003a93e7bf6c02f33c02976ff364785d4273295.tar.gz |
[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>
Diffstat (limited to 'ipc')
-rw-r--r-- | ipc/sem.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -381,6 +381,7 @@ static void update_queue (struct sem_array * sma) /* hands-off: q will disappear immediately after * writing q->status. */ + smb_wmb(); q->status = error; q = n; } else { @@ -461,6 +462,7 @@ static void freeary (struct sem_array *sma, int id) n = q->next; q->status = IN_WAKEUP; wake_up_process(q->sleeper); /* doesn't sleep */ + smp_wmb(); q->status = -EIDRM; /* hands-off q */ q = n; } |