patch-2_6_7-vs1_9_1_12
[linux-2.6.git] / net / 8021q / vlan.c
index 6203a56..a44c900 100644 (file)
@@ -49,7 +49,7 @@ static char vlan_copyright[] = "Ben Greear <greearb@candelatech.com>";
 static char vlan_buggyright[] = "David S. Miller <davem@redhat.com>";
 
 static int vlan_device_event(struct notifier_block *, unsigned long, void *);
-static int vlan_ioctl_handler(unsigned long);
+static int vlan_ioctl_handler(void __user *);
 static int unregister_vlan_dev(struct net_device *, unsigned short );
 
 struct notifier_block vlan_notifier_block = {
@@ -661,9 +661,9 @@ out:
 /*
  *     VLAN IOCTL handler.
  *     o execute requested action or pass command to the device driver
- *   arg is really a void* to a vlan_ioctl_args structure.
+ *   arg is really a struct vlan_ioctl_args __user *.
  */
-static int vlan_ioctl_handler(unsigned long arg)
+static int vlan_ioctl_handler(void __user *arg)
 {
        int err = 0;
        struct vlan_ioctl_args args;
@@ -675,8 +675,7 @@ static int vlan_ioctl_handler(unsigned long arg)
        if (!capable(CAP_NET_ADMIN))
                return -EPERM;
 
-       if (copy_from_user(&args, (void*)arg,
-                           sizeof(struct vlan_ioctl_args)))
+       if (copy_from_user(&args, arg, sizeof(struct vlan_ioctl_args)))
                return -EFAULT;
 
        /* Null terminate this sucker, just in case. */