vserver 1.9.5.x5
[linux-2.6.git] / net / ipv4 / fib_frontend.c
index fc4e9f8..563e7d6 100644 (file)
@@ -19,7 +19,7 @@
 #include <linux/module.h>
 #include <asm/uaccess.h>
 #include <asm/system.h>
-#include <asm/bitops.h>
+#include <linux/bitops.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
 #include <linux/sched.h>
@@ -75,7 +75,7 @@ struct fib_table *__fib_new_table(int id)
 #endif /* CONFIG_IP_MULTIPLE_TABLES */
 
 
-void fib_flush(void)
+static void fib_flush(void)
 {
        int flushed = 0;
 #ifdef CONFIG_IP_MULTIPLE_TABLES
@@ -172,13 +172,13 @@ int fib_validate_source(u32 src, u32 dst, u8 tos, int oif,
        int ret;
 
        no_addr = rpf = 0;
-       read_lock(&inetdev_lock);
+       rcu_read_lock();
        in_dev = __in_dev_get(dev);
        if (in_dev) {
                no_addr = in_dev->ifa_list == NULL;
                rpf = IN_DEV_RPFILTER(in_dev);
        }
-       read_unlock(&inetdev_lock);
+       rcu_read_unlock();
 
        if (in_dev == NULL)
                goto e_inval;
@@ -235,7 +235,7 @@ e_inval:
  *     Handle IP routing ioctl calls. These are used to manipulate the routing tables
  */
  
-int ip_rt_ioctl(unsigned int cmd, void *arg)
+int ip_rt_ioctl(unsigned int cmd, void __user *arg)
 {
        int err;
        struct kern_rta rta;
@@ -585,11 +585,11 @@ static int fib_netdev_event(struct notifier_block *this, unsigned long event, vo
        return NOTIFY_DONE;
 }
 
-struct notifier_block fib_inetaddr_notifier = {
+static struct notifier_block fib_inetaddr_notifier = {
        .notifier_call =fib_inetaddr_event,
 };
 
-struct notifier_block fib_netdev_notifier = {
+static struct notifier_block fib_netdev_notifier = {
        .notifier_call =fib_netdev_event,
 };