ipc/util: drop ipc_rcu_alloc()
PATCH 43/96 ipc/util: drop ipc_rcu_alloc()
From: Kees Cook <[email protected]>
Subject: ipc/util: drop ipc_rcu_alloc()
No callers remain for ipc_rcu_alloc(). Drop the function.
[[email protected]: Rediff because the memset was temporarily inside ipc_rcu_free()]
Signed-off-by Kees Cook <[email protected]>
Signed-off-by Manfred Spraul <[email protected]>
Cc Kees Cook <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
ipc/util.c | 21 --------------------- ipc/util.h | 3 --- 2 files changed, 24 deletions(-)
ipc/util.c renamed from ipc/util.c~ipc-util-drop-ipc_rcu_alloc +0 -20
@@ -394,27 +394,6 @@ void ipc_rmid(struct ipc_ids *ids, struc ipcp->deleted = true; } -/** -* ipc_rcu_alloc - allocate ipc space -* @size: size desired -* -* Allocate memory for an ipc object. -* The first member must be struct kern_ipc_perm. -*/ -struct kern_ipc_perm *ipc_rcu_alloc (int size) -{ -/* -* We prepend the allocation with the rcu struct -*/ -struct kern_ipc_perm *out =kvmalloc (size,GFP_KERNEL ); -if (unlikely (!out)) -return NULL ; - -memset (out,0 , size); -atomic_set (&out->refcount,1 ); -return out; -}