* @args: populated convert_context_args struct
* @oldc: original context
* @newc: converted context
+ * @gfp_flags: allocation flags
*
* Convert the values in the security context structure @oldc from the values
* specified in the policy @args->oldp to the values specified in the policy
* context is valid under the new policy.
*/
int services_convert_context(struct convert_context_args *args,
- struct context *oldc, struct context *newc)
+ struct context *oldc, struct context *newc,
+ gfp_t gfp_flags)
{
struct ocontext *oc;
struct role_datum *role;
int rc;
if (oldc->str) {
- s = kstrdup(oldc->str, GFP_KERNEL);
+ s = kstrdup(oldc->str, gfp_flags);
if (!s)
return -ENOMEM;