git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[PATCH] use __u8/__u32 in userspace ioctl defines for I2O
[pandora-kernel.git]
/
ipc
/
sem.c
diff --git
a/ipc/sem.c
b/ipc/sem.c
index
0dafcc4
..
d3e12ef
100644
(file)
--- a/
ipc/sem.c
+++ b/
ipc/sem.c
@@
-161,6
+161,7
@@
void sem_exit_ns(struct ipc_namespace *ns)
}
mutex_unlock(&sem_ids(ns).mutex);
}
mutex_unlock(&sem_ids(ns).mutex);
+ ipc_fini_ids(ns->ids[IPC_SEM_IDS]);
kfree(ns->ids[IPC_SEM_IDS]);
ns->ids[IPC_SEM_IDS] = NULL;
}
kfree(ns->ids[IPC_SEM_IDS]);
ns->ids[IPC_SEM_IDS] = NULL;
}
@@
-1069,14
+1070,13
@@
static struct sem_undo *find_undo(struct ipc_namespace *ns, int semid)
ipc_rcu_getref(sma);
sem_unlock(sma);
ipc_rcu_getref(sma);
sem_unlock(sma);
- new =
(struct sem_undo *) km
alloc(sizeof(struct sem_undo) + sizeof(short)*nsems, GFP_KERNEL);
+ new =
kz
alloc(sizeof(struct sem_undo) + sizeof(short)*nsems, GFP_KERNEL);
if (!new) {
ipc_lock_by_ptr(&sma->sem_perm);
ipc_rcu_putref(sma);
sem_unlock(sma);
return ERR_PTR(-ENOMEM);
}
if (!new) {
ipc_lock_by_ptr(&sma->sem_perm);
ipc_rcu_putref(sma);
sem_unlock(sma);
return ERR_PTR(-ENOMEM);
}
- memset(new, 0, sizeof(struct sem_undo) + sizeof(short)*nsems);
new->semadj = (short *) &new[1];
new->semid = semid;
new->semadj = (short *) &new[1];
new->semid = semid;