Commit daa64b10 authored by Gu Bowen's avatar Gu Bowen
Browse files

Revert "ima: Avoid blocking in RCU read-side critical section"

hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/IB0WVE



--------------------------------

This reverts commit 2d200edd.

This reverts commit is a self-developed solution, different from the
mainline solution. In order to align with the upstream, now backport the
mainline one.

Fixes: 67169ec8 ("ima: Avoid blocking in RCU read-side critical section")
Signed-off-by: default avatarGu Bowen <gubowen5@huawei.com>
parent ab348dfd
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_ATOMIC);
	nentry = kmemdup(entry, sizeof(*nentry), GFP_KERNEL);
	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_ATOMIC);
	tmprule = kzalloc(sizeof(struct selinux_audit_rule), GFP_KERNEL);
	if (!tmprule)
		return -ENOMEM;
	context_init(&tmprule->au_ctxt);