lkml.org 
[lkml]   [2008]   [Sep]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectalloc_creds ignores gfp arg (MMOTM 2008-09-18-18-08)
alloc_creds (kernel/cred.c) takes a gfp arg, but ignores it and hardcodes
GFP_KERNEL.

Erez.


/*
* 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;
}

\
 
 \ /
  Last update: 2008-09-20 19:47    [from the cache]
©2003-2011 Jasper Spaans