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    [W:0.034 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site