Merge branch 'for-linus2' of git://git.kernel.dk/linux-2.6-block
[safe/jmp/linux-2.6] / security / selinux / netif.c
index c658b84..d6095d6 100644 (file)
@@ -16,6 +16,7 @@
  */
 #include <linux/init.h>
 #include <linux/types.h>
+#include <linux/slab.h>
 #include <linux/stddef.h>
 #include <linux/kernel.h>
 #include <linux/list.h>
@@ -239,11 +240,13 @@ static void sel_netif_kill(int ifindex)
 {
        struct sel_netif *netif;
 
+       rcu_read_lock();
        spin_lock_bh(&sel_netif_lock);
        netif = sel_netif_find(ifindex);
        if (netif)
                sel_netif_destroy(netif);
        spin_unlock_bh(&sel_netif_lock);
+       rcu_read_unlock();
 }
 
 /**