[<prev] [next>] [day] [month] [year] [list]
Message-Id: <200809201722.m8KHMJEJ024123@agora.fsl.cs.sunysb.edu>
Date:	Sat, 20 Sep 2008 13:22:19 -0400
From:	Erez Zadok <ezk@...sunysb.edu>
To:	akpm@...uxfoundation.org
CC:	linux-kernel@...r.kernel.org
Subject: alloc_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;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
Powered by blists - more mailing lists