Unverified Commit 71ec57fe authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!6311 v2 ima: Avoid blocking in RCU read-side critical section

parents e26dab40 2d200edd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -462,7 +462,7 @@ static struct ima_rule_entry *ima_lsm_copy_rule(struct ima_rule_entry *entry)
	 * Immutable elements are copied over as pointers and data; only
	 * lsm rules can change
	 */
	nentry = kmemdup(entry, sizeof(*nentry), GFP_KERNEL);
	nentry = kmemdup(entry, sizeof(*nentry), GFP_ATOMIC);
	if (!nentry)
		return NULL;

+1 −1
Original line number Diff line number Diff line
@@ -3538,7 +3538,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;
	context_init(&tmprule->au_ctxt);