aboutsummaryrefslogtreecommitdiffstats
path: root/ipc
diff options
context:
space:
mode:
Diffstat (limited to 'ipc')
-rw-r--r--ipc/namespace.c2
-rw-r--r--ipc/util.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/ipc/namespace.c b/ipc/namespace.c
index 3c3e5223e7e..8054c8e5faf 100644
--- a/ipc/namespace.c
+++ b/ipc/namespace.c
@@ -104,7 +104,6 @@ static void free_ipc_ns(struct ipc_namespace *ns)
104 sem_exit_ns(ns); 104 sem_exit_ns(ns);
105 msg_exit_ns(ns); 105 msg_exit_ns(ns);
106 shm_exit_ns(ns); 106 shm_exit_ns(ns);
107 kfree(ns);
108 atomic_dec(&nr_ipc_ns); 107 atomic_dec(&nr_ipc_ns);
109 108
110 /* 109 /*
@@ -113,6 +112,7 @@ static void free_ipc_ns(struct ipc_namespace *ns)
113 */ 112 */
114 ipcns_notify(IPCNS_REMOVED); 113 ipcns_notify(IPCNS_REMOVED);
115 put_user_ns(ns->user_ns); 114 put_user_ns(ns->user_ns);
115 kfree(ns);
116} 116}
117 117
118/* 118/*
diff --git a/ipc/util.c b/ipc/util.c
index 8fd1b891ec0..5c0d28921ba 100644
--- a/ipc/util.c
+++ b/ipc/util.c
@@ -317,6 +317,7 @@ retry:
317 317
318/** 318/**
319 * ipc_check_perms - check security and permissions for an IPC 319 * ipc_check_perms - check security and permissions for an IPC
320 * @ns: IPC namespace
320 * @ipcp: ipc permission set 321 * @ipcp: ipc permission set
321 * @ops: the actual security routine to call 322 * @ops: the actual security routine to call
322 * @params: its parameters 323 * @params: its parameters
@@ -607,6 +608,7 @@ void ipc_rcu_putref(void *ptr)
607 608
608/** 609/**
609 * ipcperms - check IPC permissions 610 * ipcperms - check IPC permissions
611 * @ns: IPC namespace
610 * @ipcp: IPC permission set 612 * @ipcp: IPC permission set
611 * @flag: desired permission set. 613 * @flag: desired permission set.
612 * 614 *
@@ -769,7 +771,7 @@ void ipc_update_perm(struct ipc64_perm *in, struct kern_ipc_perm *out)
769 771
770/** 772/**
771 * ipcctl_pre_down - retrieve an ipc and check permissions for some IPC_XXX cmd 773 * ipcctl_pre_down - retrieve an ipc and check permissions for some IPC_XXX cmd
772 * @ids: the ipc namespace 774 * @ns: the ipc namespace
773 * @ids: the table of ids where to look for the ipc 775 * @ids: the table of ids where to look for the ipc
774 * @id: the id of the ipc to retrieve 776 * @id: the id of the ipc to retrieve
775 * @cmd: the cmd to check 777 * @cmd: the cmd to check