aboutsummaryrefslogtreecommitdiffstats
path: root/security/selinux/ibpkey.c
diff options
context:
space:
mode:
authorPaul Moore <paul@paul-moore.com>2022-01-27 10:56:13 -0500
committerPaul Moore <paul@paul-moore.com>2022-02-01 19:08:28 -0500
commit0e326df069802dc48e4f095f889cb780e4beaba6 (patch)
treece81cfb714f72eb8081c13dfc5ebd60342cb5106 /security/selinux/ibpkey.c
parentselinux: try to use preparsed sid before calling parse_sid() (diff)
downloadlinux-dev-0e326df069802dc48e4f095f889cb780e4beaba6.tar.xz
linux-dev-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/ibpkey.c')
-rw-r--r--security/selinux/ibpkey.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/selinux/ibpkey.c b/security/selinux/ibpkey.c
index 20b3b2243820..5839ca7bb9c7 100644
--- a/security/selinux/ibpkey.c
+++ b/security/selinux/ibpkey.c
@@ -104,7 +104,7 @@ static void sel_ib_pkey_insert(struct sel_ib_pkey *pkey)
tail = list_entry(
rcu_dereference_protected(
- sel_ib_pkey_hash[idx].list.prev,
+ list_tail_rcu(&sel_ib_pkey_hash[idx].list),
lockdep_is_held(&sel_ib_pkey_lock)),
struct sel_ib_pkey, list);
list_del_rcu(&tail->list);