summaryrefslogtreecommitdiffstats
path: root/ipc
diff options
context:
space:
mode:
Diffstat (limited to 'ipc')
-rw-r--r--ipc/sem.c2
-rw-r--r--ipc/shm.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/ipc/sem.c b/ipc/sem.c
index 1dfdc92c0..a8dc53890 100644
--- a/ipc/sem.c
+++ b/ipc/sem.c
@@ -309,7 +309,7 @@ static void update_queue (struct sem_array * sma)
for (q = sma->sem_pending; q; q = q->next) {
if (q->status == 1)
- return; /* wait for other process */
+ continue; /* this one was woken up before */
error = try_atomic_semop(sma, q->sops, q->nsops,
q->undo, q->pid, q->alter);
diff --git a/ipc/shm.c b/ipc/shm.c
index 9c326c799..6c6fc31d6 100644
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -925,9 +925,9 @@ static struct page * shm_nopage(struct vm_area_struct * shmd, unsigned long addr
swap_free(entry);
if ((shp != shm_lock(shp->id)) && (is_shmzero == 0))
BUG();
- if (is_shmzero) shm_swp--;
+ if (is_shmzero == 0) shm_swp--;
}
- if (is_shmzero) shm_rss++;
+ if (is_shmzero == 0) shm_rss++;
pte = pte_mkdirty(mk_pte(page, PAGE_SHARED));
SHM_ENTRY(shp, idx) = pte;
} else