X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;ds=sidebyside;f=net%2F8021q%2Fvlan.c;h=a44c900ac08bad6c26fe4a9612298cbed4bf72f4;hb=9213980e6a70d8473e0ffd4b39ab5b6caaba9ff5;hp=6203a5616b03c048788fffc0ef7dedc51793bbcd;hpb=c449269f45c2cdf53af08c8d0af37472f66539d9;p=linux-2.6.git diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c index 6203a5616..a44c900ac 100644 --- a/net/8021q/vlan.c +++ b/net/8021q/vlan.c @@ -49,7 +49,7 @@ static char vlan_copyright[] = "Ben Greear "; static char vlan_buggyright[] = "David S. Miller "; 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. */