Commit 722386b9 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] sparse: dev_ioctl() callers

	dev_ioctl() has a __user pointer argument; however, its declaration
lacks that and callers are also wrong.  Declaration fixed, callers updated.
parent 21a61fb3
......@@ -676,7 +676,7 @@ static inline void dev_kfree_skb_any(struct sk_buff *skb)
extern int netif_rx(struct sk_buff *skb);
#define HAVE_NETIF_RECEIVE_SKB 1
extern int netif_receive_skb(struct sk_buff *skb);
extern int dev_ioctl(unsigned int cmd, void *);
extern int dev_ioctl(unsigned int cmd, void __user *);
extern int dev_ethtool(struct ifreq *);
extern unsigned dev_get_flags(const struct net_device *);
extern int dev_change_flags(struct net_device *, unsigned);
......
......@@ -1829,7 +1829,7 @@ static int atalk_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
case SIOCGIFCOUNT:
case SIOCGIFINDEX:
case SIOCGIFNAME:
rc = dev_ioctl(cmd, (void *)arg);
rc = dev_ioctl(cmd, (void __user *)arg);
break;
}
......
......@@ -1826,7 +1826,7 @@ static int ax25_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
break;
default:
res = dev_ioctl(cmd, (void *)arg);
res = dev_ioctl(cmd, (void __user *)arg);
break;
}
release_sock(sk);
......
......@@ -1248,7 +1248,7 @@ static int dn_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
break;
default:
err = dev_ioctl(cmd, (void *)arg);
err = dev_ioctl(cmd, (void __user *)arg);
break;
}
......
......@@ -673,7 +673,7 @@ static int econet_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg
break;
default:
return dev_ioctl(cmd,(void *) arg);
return dev_ioctl(cmd,(void __user *) arg);
}
/*NOTREACHED*/
return 0;
......
......@@ -872,7 +872,7 @@ int inet_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
if (!sk->sk_prot->ioctl ||
(err = sk->sk_prot->ioctl(sk, cmd, arg)) ==
-ENOIOCTLCMD)
err = dev_ioctl(cmd, (void *)arg);
err = dev_ioctl(cmd, (void __user *)arg);
break;
}
return err;
......
......@@ -490,7 +490,7 @@ int inet6_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
default:
if (!sk->sk_prot->ioctl ||
(err = sk->sk_prot->ioctl(sk, cmd, arg)) == -ENOIOCTLCMD)
return(dev_ioctl(cmd,(void *) arg));
return(dev_ioctl(cmd,(void __user *) arg));
return err;
}
/*NOTREACHED*/
......
......@@ -1883,7 +1883,7 @@ static int ipx_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
rc = -EINVAL;
break;
default:
rc = dev_ioctl(cmd,(void *) arg);
rc = dev_ioctl(cmd,(void __user *) arg);
break;
}
......
......@@ -1813,7 +1813,7 @@ static int irda_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
return -EINVAL;
default:
IRDA_DEBUG(1, "%s(), doing device ioctl!\n", __FUNCTION__);
return dev_ioctl(cmd, (void *) arg);
return dev_ioctl(cmd, (void __user *) arg);
}
/*NOTREACHED*/
......
......@@ -867,7 +867,7 @@ static int llc_ui_getname(struct socket *sock, struct sockaddr *uaddr,
static int llc_ui_ioctl(struct socket *sock, unsigned int cmd,
unsigned long arg)
{
return dev_ioctl(cmd, (void *)arg);
return dev_ioctl(cmd, (void __user *)arg);
}
/**
......
......@@ -1228,7 +1228,7 @@ static int nr_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
default:
release_sock(sk);
return dev_ioctl(cmd, (void *)arg);
return dev_ioctl(cmd, (void __user *)arg);
}
release_sock(sk);
......
......@@ -1486,7 +1486,7 @@ static int packet_ioctl(struct socket *sock, unsigned int cmd,
#endif
default:
return dev_ioctl(cmd, (void *)arg);
return dev_ioctl(cmd, (void __user *)arg);
}
return 0;
}
......
......@@ -1335,7 +1335,7 @@ static int rose_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
return 0;
default:
return dev_ioctl(cmd, (void *)arg);
return dev_ioctl(cmd, (void __user *)arg);
}
return 0;
......
......@@ -775,11 +775,11 @@ static int sock_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
unlock_kernel();
sock = SOCKET_I(inode);
if (cmd >= SIOCDEVPRIVATE && cmd <= (SIOCDEVPRIVATE + 15)) {
err = dev_ioctl(cmd, (void *)arg);
err = dev_ioctl(cmd, (void __user *)arg);
} else
#ifdef WIRELESS_EXT
if (cmd >= SIOCIWFIRST && cmd <= SIOCIWLAST) {
err = dev_ioctl(cmd, (void *)arg);
err = dev_ioctl(cmd, (void __user *)arg);
} else
#endif /* WIRELESS_EXT */
switch (cmd) {
......
......@@ -1849,7 +1849,7 @@ static int unix_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
}
default:
err = dev_ioctl(cmd, (void *)arg);
err = dev_ioctl(cmd, (void __user *)arg);
break;
}
return err;
......
......@@ -1832,7 +1832,7 @@ static int wanpipe_ioctl(struct socket *sock, unsigned int cmd, unsigned long ar
#endif
default:
return dev_ioctl(cmd,(void *) arg);
return dev_ioctl(cmd,(void __user *) arg);
}
/*NOTREACHED*/
}
......
......@@ -1306,7 +1306,7 @@ static int x25_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
}
default:
rc = dev_ioctl(cmd, (void *)arg);
rc = dev_ioctl(cmd, (void __user *)arg);
break;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment