Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions kernel/selinux/rules.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ void apply_kernelsu_rules()

mutex_lock(&selinux_state.policy_mutex);
pol = ksu_dup_sepolicy(rcu_dereference_protected(old_pol, lockdep_is_held(&selinux_state.policy_mutex)));
if (!pol) {
pr_err("failed to dup selinux_policy\n");
if (IS_ERR(pol)) {
pr_err("failed to dup selinux_policy: %ld\n", PTR_ERR(pol));
goto out_unlock;
}

Expand Down Expand Up @@ -433,8 +433,9 @@ int handle_sepolicy(void __user *user_data, u64 data_len)

old_pol = selinux_state.policy;
pol = ksu_dup_sepolicy(rcu_dereference_protected(old_pol, lockdep_is_held(&selinux_state.policy_mutex)));
if (!pol) {
ret = -ENOMEM;
if (IS_ERR(pol)) {
ret = PTR_ERR(pol);
pr_err("ksu_dup_sepolicy err: %d\n", ret);
goto out_unlock;
}
db = &pol->policydb;
Expand Down
Loading