aboutsummaryrefslogtreecommitdiffstats
path: root/security/selinux/netport.c
diff options
context:
space:
mode:
Diffstat (limited to 'security/selinux/netport.c')
-rw-r--r--security/selinux/netport.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/security/selinux/netport.c b/security/selinux/netport.c
index 0b62bd112461..7b9eb1faf68b 100644
--- a/security/selinux/netport.c
+++ b/security/selinux/netport.c
@@ -123,7 +123,9 @@ static void sel_netport_insert(struct sel_netport *port)
123 if (sel_netport_hash[idx].size == SEL_NETPORT_HASH_BKT_LIMIT) { 123 if (sel_netport_hash[idx].size == SEL_NETPORT_HASH_BKT_LIMIT) {
124 struct sel_netport *tail; 124 struct sel_netport *tail;
125 tail = list_entry( 125 tail = list_entry(
126 rcu_dereference(sel_netport_hash[idx].list.prev), 126 rcu_dereference_protected(
127 sel_netport_hash[idx].list.prev,
128 lockdep_is_held(&sel_netport_lock)),
127 struct sel_netport, list); 129 struct sel_netport, list);
128 list_del_rcu(&tail->list); 130 list_del_rcu(&tail->list);
129 kfree_rcu(tail, rcu); 131 kfree_rcu(tail, rcu);