diff options
Diffstat (limited to 'security/selinux/ss/services.c')
-rw-r--r-- | security/selinux/ss/services.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c index e63c4f942fd6..0092b29022f5 100644 --- a/security/selinux/ss/services.c +++ b/security/selinux/ss/services.c @@ -2013,6 +2013,7 @@ static inline int convert_context_handle_invalid_context( * @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 @@ -2020,7 +2021,8 @@ static inline int convert_context_handle_invalid_context( * 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; @@ -2031,7 +2033,7 @@ int services_convert_context(struct convert_context_args *args, int rc; if (oldc->str) { - s = kstrdup(oldc->str, GFP_KERNEL); + s = kstrdup(oldc->str, gfp_flags); if (!s) return -ENOMEM; |