diff options
author | Paul Moore <paul@paul-moore.com> | 2022-01-27 10:56:13 -0500 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2022-02-01 19:08:28 -0500 |
commit | 0e326df069802dc48e4f095f889cb780e4beaba6 (patch) | |
tree | ce81cfb714f72eb8081c13dfc5ebd60342cb5106 /security/selinux/hooks.c | |
parent | 6bc1968c14e91e03c0851b9c5c5330d91305a853 (diff) | |
download | lwn-0e326df069802dc48e4f095f889cb780e4beaba6.tar.gz lwn-0e326df069802dc48e4f095f889cb780e4beaba6.zip |
selinux: various sparse fixes
When running the SELinux code through sparse, there are a handful of
warnings. This patch resolves some of these warnings caused by
"__rcu" mismatches.
% make W=1 C=1 security/selinux/
Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'security/selinux/hooks.c')
-rw-r--r-- | security/selinux/hooks.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index b60481192b38..b24a1aeeedd4 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c @@ -2553,7 +2553,7 @@ static void selinux_bprm_committed_creds(struct linux_binprm *bprm) if (rc) { clear_itimer(); - spin_lock_irq(¤t->sighand->siglock); + spin_lock_irq(&unrcu_pointer(current->sighand)->siglock); if (!fatal_signal_pending(current)) { flush_sigqueue(¤t->pending); flush_sigqueue(¤t->signal->shared_pending); @@ -2561,13 +2561,13 @@ static void selinux_bprm_committed_creds(struct linux_binprm *bprm) sigemptyset(¤t->blocked); recalc_sigpending(); } - spin_unlock_irq(¤t->sighand->siglock); + spin_unlock_irq(&unrcu_pointer(current->sighand)->siglock); } /* Wake up the parent if it is waiting so that it can recheck * wait permission to the new task SID. */ read_lock(&tasklist_lock); - __wake_up_parent(current, current->real_parent); + __wake_up_parent(current, unrcu_pointer(current->real_parent)); read_unlock(&tasklist_lock); } |