* [PATCH] cr: ipc: don't unlock before calling freeary in error path
@ 2009-05-29 20:23 Serge E. Hallyn
[not found] ` <20090529202306.GA11982-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Serge E. Hallyn @ 2009-05-29 20:23 UTC (permalink / raw)
To: Oren Laadan; +Cc: Linux Containers
Else freeary will BUG out.
Signed-off-by: Serge E. Hallyn <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
---
ipc/checkpoint_sem.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/ipc/checkpoint_sem.c b/ipc/checkpoint_sem.c
index 34dea40..e6934dc 100644
--- a/ipc/checkpoint_sem.c
+++ b/ipc/checkpoint_sem.c
@@ -206,12 +206,11 @@ int restore_ipc_sem(struct ckpt_ctx *ctx)
memcpy(sem->sem_base, sma, sem->sem_nsems * sizeof(*sma));
ret = load_ipc_sem_hdr(ctx, h, sem);
- ipc_unlock(perms);
-
if (ret < 0) {
ckpt_debug("sem: need to remove (%d)\n", ret);
freeary(current->nsproxy->ipc_ns, perms);
- }
+ } else
+ ipc_unlock(perms);
up_write(&sem_ids->rw_mutex);
out:
kfree(sma);
--
1.6.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-05-29 20:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-29 20:23 [PATCH] cr: ipc: don't unlock before calling freeary in error path Serge E. Hallyn
[not found] ` <20090529202306.GA11982-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-05-29 20:46 ` Oren Laadan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.