aboutsummaryrefslogtreecommitdiffstats
path: root/security/selinux/netport.c
diff options
context:
space:
mode:
authorPaul Moore <[email protected]>2022-01-27 15:56:13 +0000
committerPaul Moore <[email protected]>2022-02-02 00:08:28 +0000
commit0e326df069802dc48e4f095f889cb780e4beaba6 (patch)
treece81cfb714f72eb8081c13dfc5ebd60342cb5106 /security/selinux/netport.c
parentselinux: try to use preparsed sid before calling parse_sid() (diff)
downloadkernel-0e326df069802dc48e4f095f889cb780e4beaba6.tar.gz
kernel-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 <[email protected]>
Diffstat (limited to 'security/selinux/netport.c')
-rw-r--r--security/selinux/netport.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/selinux/netport.c b/security/selinux/netport.c
index 9ba09d11c0f5..8eec6347cf01 100644
--- a/security/selinux/netport.c
+++ b/security/selinux/netport.c
@@ -113,7 +113,7 @@ static void sel_netport_insert(struct sel_netport *port)
struct sel_netport *tail;
tail = list_entry(
rcu_dereference_protected(
- sel_netport_hash[idx].list.prev,
+ list_tail_rcu(&sel_netport_hash[idx].list),
lockdep_is_held(&sel_netport_lock)),
struct sel_netport, list);
list_del_rcu(&tail->list);