diff --git a/security/integrity/ima/ima_policy.c b/security/integrity/ima/ima_policy.c index d71273898d40f50caec56002ab5cbdc0078f86d3..08eae4df759e3d06a217b5f5c96c6fbee0a4bbe7 100644 --- a/security/integrity/ima/ima_policy.c +++ b/security/integrity/ima/ima_policy.c @@ -266,7 +266,7 @@ static struct ima_rule_entry *ima_lsm_copy_rule(struct ima_rule_entry *entry) struct ima_rule_entry *nentry; int i; - nentry = kmalloc(sizeof(*nentry), GFP_KERNEL); + nentry = kmalloc(sizeof(*nentry), GFP_ATOMIC); if (!nentry) return NULL; @@ -283,7 +283,7 @@ static struct ima_rule_entry *ima_lsm_copy_rule(struct ima_rule_entry *entry) nentry->lsm[i].type = entry->lsm[i].type; nentry->lsm[i].args_p = kstrdup(entry->lsm[i].args_p, - GFP_KERNEL); + GFP_ATOMIC); if (!nentry->lsm[i].args_p) goto out_err; diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c index a9f2bc8443bd5883190fda2f59cf0d517538bffe..a1ea7d90ce4febe0cf82d2c5331b8c4d7106b59e 100644 --- a/security/selinux/ss/services.c +++ b/security/selinux/ss/services.c @@ -3328,7 +3328,7 @@ int selinux_audit_rule_init(u32 field, u32 op, char *rulestr, void **vrule) return -EINVAL; } - tmprule = kzalloc(sizeof(struct selinux_audit_rule), GFP_KERNEL); + tmprule = kzalloc(sizeof(struct selinux_audit_rule), GFP_ATOMIC); if (!tmprule) return -ENOMEM;