]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - security/selinux/netport.c
Merge branch 'mailbox-for-next' of git://git.linaro.org/landing-teams/working/fujitsu...
[mirror_ubuntu-artful-kernel.git] / security / selinux / netport.c
index d35379781c2c44ab188cb7aed071579da189bb53..3311cc393cb483271f41b77ae09bbad3a9cd4b1f 100644 (file)
@@ -217,7 +217,7 @@ int sel_netport_sid(u8 protocol, u16 pnum, u32 *sid)
  * Remove all entries from the network address table.
  *
  */
-static void sel_netport_flush(void)
+void sel_netport_flush(void)
 {
        unsigned int idx;
        struct sel_netport *port, *port_tmp;
@@ -234,19 +234,9 @@ static void sel_netport_flush(void)
        spin_unlock_bh(&sel_netport_lock);
 }
 
-static int sel_netport_avc_callback(u32 event)
-{
-       if (event == AVC_CALLBACK_RESET) {
-               sel_netport_flush();
-               synchronize_net();
-       }
-       return 0;
-}
-
 static __init int sel_netport_init(void)
 {
        int iter;
-       int ret;
 
        if (!selinux_enabled)
                return 0;
@@ -256,11 +246,7 @@ static __init int sel_netport_init(void)
                sel_netport_hash[iter].size = 0;
        }
 
-       ret = avc_add_callback(sel_netport_avc_callback, AVC_CALLBACK_RESET);
-       if (ret != 0)
-               panic("avc_add_callback() failed, error %d\n", ret);
-
-       return ret;
+       return 0;
 }
 
 __initcall(sel_netport_init);