Unverified Commit 8e062104 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!6309 v5 ima: Avoid blocking in RCU read-side critical section

parents 87a88720 0d822661
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;

+1 −1
Original line number Diff line number Diff line
@@ -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;