/* ioctl calls. Shouldn't even need touching */
/* Device configuration ioctl calls */
-static int atif_ioctl(int cmd, void *arg)
+static int atif_ioctl(int cmd, void __user *arg)
{
static char aarp_mcast[6] = { 0x09, 0x00, 0x00, 0xFF, 0xFF, 0xFF };
struct ifreq atreq;
}
/* Routing ioctl() calls */
-static int atrtr_ioctl(unsigned int cmd, void *arg)
+static int atrtr_ioctl(unsigned int cmd, void __user *arg)
{
struct rtentry rt;
struct atalk_route *rt;
int err;
- if (flags & ~MSG_DONTWAIT)
+ if (flags & ~(MSG_DONTWAIT|MSG_CMSG_COMPAT))
return -EINVAL;
if (len > DDP_MAXSZ)
{
int rc = -EINVAL;
struct sock *sk = sock->sk;
+ void __user *argp = (void __user *)arg;
switch (cmd) {
/* Protocol layer */
if (amount < 0)
amount = 0;
- rc = put_user(amount, (int *)arg);
+ rc = put_user(amount, (int __user *)argp);
break;
}
case TIOCINQ: {
if (skb)
amount = skb->len - sizeof(struct ddpehdr);
- rc = put_user(amount, (int *)arg);
+ rc = put_user(amount, (int __user *)argp);
break;
}
case SIOCGSTAMP:
- rc = sock_get_timestamp(sk, (struct timeval *)arg);
+ rc = sock_get_timestamp(sk, argp);
break;
/* Routing */
case SIOCADDRT:
case SIOCDELRT:
rc = -EPERM;
if (capable(CAP_NET_ADMIN))
- rc = atrtr_ioctl(cmd, (void *)arg);
+ rc = atrtr_ioctl(cmd, argp);
break;
/* Interface */
case SIOCGIFADDR:
case SIOCSARP: /* proxy AARP */
case SIOCDARP: /* proxy AARP */
rtnl_lock();
- rc = atif_ioctl(cmd, (void *)arg);
+ rc = atif_ioctl(cmd, argp);
rtnl_unlock();
break;
/* Physical layer ioctl calls */
case SIOCGIFCOUNT:
case SIOCGIFINDEX:
case SIOCGIFNAME:
- rc = dev_ioctl(cmd, (void *)arg);
+ rc = dev_ioctl(cmd, argp);
break;
}