alloc_creds ignores gfp arg (MMOTM 2008-09-18-18-08)

From: Erez Zadok
Date: Sat Sep 20 2008 - 13:44:30 EST


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;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/