Merge tag 'selinux-pr-20221212' of git://git.kernel.org/pub/scm/linux/kernel/git...
[platform/kernel/linux-rpi.git] / security / selinux / ss / sidtab.c
index 1c3d2cd..38d2517 100644 (file)
@@ -328,7 +328,8 @@ int sidtab_context_to_sid(struct sidtab *s, struct context *context,
                }
 
                rc = services_convert_context(convert->args,
-                                             context, &dst_convert->context);
+                                             context, &dst_convert->context,
+                                             GFP_ATOMIC);
                if (rc) {
                        context_destroy(&dst->context);
                        goto out_unlock;
@@ -407,7 +408,8 @@ static int sidtab_convert_tree(union sidtab_entry_inner *edst,
                while (i < SIDTAB_LEAF_ENTRIES && *pos < count) {
                        rc = services_convert_context(convert->args,
                                        &esrc->ptr_leaf->entries[i].context,
-                                       &edst->ptr_leaf->entries[i].context);
+                                       &edst->ptr_leaf->entries[i].context,
+                                       GFP_KERNEL);
                        if (rc)
                                return rc;
                        (*pos)++;