Skip to contentSkip to conversation

CRED: Delete alloc_creds() as it's not used

PATCH In review David Howells 2 participants 2 messages Sep 22, 2008 – Sep 23, 2008 Credentials

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 CRED: Delete alloc_creds() as it's not used

Delete alloc_creds() as it's not used.

---

 kernel/cred-internals.h |    5 -----
 kernel/cred.c           |   15 ---------------
 2 files changed, 0 insertions(+), 20 deletions(-)
kernel/cred-internals.h +0 -5
index f16312a..2dc4fc2 100644
@@ -10,11 +10,6 @@
  */
 
 /*
- * cred.c
- */
-extern struct cred *alloc_creds(const struct cred *, gfp_t);
-
-/*
  * user.c
  */
 static inline void sched_switch_user(struct task_struct *p)
kernel/cred.c +0 -15
index a68a154..49ed76a 100644
@@ -112,21 +112,6 @@ void __put_cred(struct cred *cred)
 }
 EXPORT_SYMBOL(__put_cred);
 
-/*
- * Allocate new credentials
- */
-struct cred *alloc_creds(const struct cred *old, gfp_t gfp)
-{
-	struct cred *new;
-
-	new = kmem_cache_alloc(cred_jar, GFP_KERNEL);
-	if (!new)
-		return NULL;
-	if (old)
-		memcpy(new, old, sizeof(struct cred));
-	return new;
-}
-
 /**
  * prepare_creds - Prepare a new set of credentials for modification
  *
#1 lore raw
Quoted 3 lines · David Howells

Delete alloc_creds() as it's not used.

Applied to
git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6#next-creds-subsys

(and not #next-creds, which is supposed to be dead).

- James

Signature · 2 lines
James Morris
<[email protected]>