[CRIU] [PATCH] IPC: set IPC_PRIVATE key always on semctl syscall
Stanislav Kinsbursky
skinsbursky at parallels.com
Thu Aug 9 07:48:44 EDT 2012
IPC_PRIVATE key is equal to zero. And there could be more than one object with
such key. So no need to check either this key is used already. Just asssign it
to IPC object.
---
ipc/util.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/ipc/util.c b/ipc/util.c
index 7b1a2d8..d1e2f25 100644
--- a/ipc/util.c
+++ b/ipc/util.c
@@ -779,7 +779,7 @@ int ipc_update_key(struct ipc_ids *ids, struct ipc64_perm *in,
struct kern_ipc_perm *out)
{
- if (out->key != in->key) {
+ if (in->key && out->key != in->key) {
/*
* Check for existent segment with the same key.
* Note: ipc_ids.rw_mutex is taken for write already.
More information about the CRIU
mailing list