aboutsummaryrefslogtreecommitdiffstats
path: root/security/selinux/netnode.c
diff options
context:
space:
mode:
Diffstat (limited to 'security/selinux/netnode.c')
-rw-r--r--security/selinux/netnode.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/security/selinux/netnode.c b/security/selinux/netnode.c
index 03a72c32afd7..da923f89d2a9 100644
--- a/security/selinux/netnode.c
+++ b/security/selinux/netnode.c
@@ -283,7 +283,7 @@ int sel_netnode_sid(void *addr, u16 family, u32 *sid)
283 * Remove all entries from the network address table. 283 * Remove all entries from the network address table.
284 * 284 *
285 */ 285 */
286static void sel_netnode_flush(void) 286void sel_netnode_flush(void)
287{ 287{
288 unsigned int idx; 288 unsigned int idx;
289 struct sel_netnode *node, *node_tmp; 289 struct sel_netnode *node, *node_tmp;
@@ -300,19 +300,9 @@ static void sel_netnode_flush(void)
300 spin_unlock_bh(&sel_netnode_lock); 300 spin_unlock_bh(&sel_netnode_lock);
301} 301}
302 302
303static int sel_netnode_avc_callback(u32 event)
304{
305 if (event == AVC_CALLBACK_RESET) {
306 sel_netnode_flush();
307 synchronize_net();
308 }
309 return 0;
310}
311
312static __init int sel_netnode_init(void) 303static __init int sel_netnode_init(void)
313{ 304{
314 int iter; 305 int iter;
315 int ret;
316 306
317 if (!selinux_enabled) 307 if (!selinux_enabled)
318 return 0; 308 return 0;
@@ -322,11 +312,7 @@ static __init int sel_netnode_init(void)
322 sel_netnode_hash[iter].size = 0; 312 sel_netnode_hash[iter].size = 0;
323 } 313 }
324 314
325 ret = avc_add_callback(sel_netnode_avc_callback, AVC_CALLBACK_RESET); 315 return 0;
326 if (ret != 0)
327 panic("avc_add_callback() failed, error %d\n", ret);
328
329 return ret;
330} 316}
331 317
332__initcall(sel_netnode_init); 318__initcall(sel_netnode_init);