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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Erez Zadok
Date: Saturday, September 20, 2008 - 10:22 am

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;
}
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
alloc_creds ignores gfp arg (MMOTM 2008-09-18-18-08), Erez Zadok, (Sat Sep 20, 10:22 am)