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) ...@@ -676,7 +676,7 @@ static inline void dev_kfree_skb_any(struct sk_buff *skb)
extern int netif_rx(struct sk_buff *skb); extern int netif_rx(struct sk_buff *skb);
#define HAVE_NETIF_RECEIVE_SKB 1 #define HAVE_NETIF_RECEIVE_SKB 1
extern int netif_receive_skb(struct sk_buff *skb); 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 int dev_ethtool(struct ifreq *);
extern unsigned dev_get_flags(const struct net_device *); extern unsigned dev_get_flags(const struct net_device *);
extern int dev_change_flags(struct net_device *, unsigned); 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) ...@@ -1829,7 +1829,7 @@ static int atalk_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
case SIOCGIFCOUNT: case SIOCGIFCOUNT:
case SIOCGIFINDEX: case SIOCGIFINDEX:
case SIOCGIFNAME: case SIOCGIFNAME:
rc = dev_ioctl(cmd, (void *)arg); rc = dev_ioctl(cmd, (void __user *)arg);
break; break;
} }
......
...@@ -1826,7 +1826,7 @@ static int ax25_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) ...@@ -1826,7 +1826,7 @@ static int ax25_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
break; break;
default: default:
res = dev_ioctl(cmd, (void *)arg); res = dev_ioctl(cmd, (void __user *)arg);
break; break;
} }
release_sock(sk); release_sock(sk);
......
...@@ -1248,7 +1248,7 @@ static int dn_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) ...@@ -1248,7 +1248,7 @@ static int dn_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
break; break;
default: default:
err = dev_ioctl(cmd, (void *)arg); err = dev_ioctl(cmd, (void __user *)arg);
break; break;
} }
......
...@@ -673,7 +673,7 @@ static int econet_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg ...@@ -673,7 +673,7 @@ static int econet_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg
break; break;
default: default:
return dev_ioctl(cmd,(void *) arg); return dev_ioctl(cmd,(void __user *) arg);
} }
/*NOTREACHED*/ /*NOTREACHED*/
return 0; return 0;
......
...@@ -872,7 +872,7 @@ int inet_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) ...@@ -872,7 +872,7 @@ int inet_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
if (!sk->sk_prot->ioctl || if (!sk->sk_prot->ioctl ||
(err = sk->sk_prot->ioctl(sk, cmd, arg)) == (err = sk->sk_prot->ioctl(sk, cmd, arg)) ==
-ENOIOCTLCMD) -ENOIOCTLCMD)
err = dev_ioctl(cmd, (void *)arg); err = dev_ioctl(cmd, (void __user *)arg);
break; break;
} }
return err; return err;
......
...@@ -490,7 +490,7 @@ int inet6_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) ...@@ -490,7 +490,7 @@ int inet6_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
default: default:
if (!sk->sk_prot->ioctl || if (!sk->sk_prot->ioctl ||
(err = sk->sk_prot->ioctl(sk, cmd, arg)) == -ENOIOCTLCMD) (err = sk->sk_prot->ioctl(sk, cmd, arg)) == -ENOIOCTLCMD)
return(dev_ioctl(cmd,(void *) arg)); return(dev_ioctl(cmd,(void __user *) arg));
return err; return err;
} }
/*NOTREACHED*/ /*NOTREACHED*/
......
...@@ -1883,7 +1883,7 @@ static int ipx_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) ...@@ -1883,7 +1883,7 @@ static int ipx_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
rc = -EINVAL; rc = -EINVAL;
break; break;
default: default:
rc = dev_ioctl(cmd,(void *) arg); rc = dev_ioctl(cmd,(void __user *) arg);
break; break;
} }
......
...@@ -1813,7 +1813,7 @@ static int irda_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) ...@@ -1813,7 +1813,7 @@ static int irda_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
return -EINVAL; return -EINVAL;
default: default:
IRDA_DEBUG(1, "%s(), doing device ioctl!\n", __FUNCTION__); IRDA_DEBUG(1, "%s(), doing device ioctl!\n", __FUNCTION__);
return dev_ioctl(cmd, (void *) arg); return dev_ioctl(cmd, (void __user *) arg);
} }
/*NOTREACHED*/ /*NOTREACHED*/
......
...@@ -867,7 +867,7 @@ static int llc_ui_getname(struct socket *sock, struct sockaddr *uaddr, ...@@ -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, static int llc_ui_ioctl(struct socket *sock, unsigned int cmd,
unsigned long arg) 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) ...@@ -1228,7 +1228,7 @@ static int nr_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
default: default:
release_sock(sk); release_sock(sk);
return dev_ioctl(cmd, (void *)arg); return dev_ioctl(cmd, (void __user *)arg);
} }
release_sock(sk); release_sock(sk);
......
...@@ -1486,7 +1486,7 @@ static int packet_ioctl(struct socket *sock, unsigned int cmd, ...@@ -1486,7 +1486,7 @@ static int packet_ioctl(struct socket *sock, unsigned int cmd,
#endif #endif
default: default:
return dev_ioctl(cmd, (void *)arg); return dev_ioctl(cmd, (void __user *)arg);
} }
return 0; return 0;
} }
......
...@@ -1335,7 +1335,7 @@ static int rose_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) ...@@ -1335,7 +1335,7 @@ static int rose_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
return 0; return 0;
default: default:
return dev_ioctl(cmd, (void *)arg); return dev_ioctl(cmd, (void __user *)arg);
} }
return 0; return 0;
......
...@@ -775,11 +775,11 @@ static int sock_ioctl(struct inode *inode, struct file *file, unsigned int cmd, ...@@ -775,11 +775,11 @@ static int sock_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
unlock_kernel(); unlock_kernel();
sock = SOCKET_I(inode); sock = SOCKET_I(inode);
if (cmd >= SIOCDEVPRIVATE && cmd <= (SIOCDEVPRIVATE + 15)) { if (cmd >= SIOCDEVPRIVATE && cmd <= (SIOCDEVPRIVATE + 15)) {
err = dev_ioctl(cmd, (void *)arg); err = dev_ioctl(cmd, (void __user *)arg);
} else } else
#ifdef WIRELESS_EXT #ifdef WIRELESS_EXT
if (cmd >= SIOCIWFIRST && cmd <= SIOCIWLAST) { if (cmd >= SIOCIWFIRST && cmd <= SIOCIWLAST) {
err = dev_ioctl(cmd, (void *)arg); err = dev_ioctl(cmd, (void __user *)arg);
} else } else
#endif /* WIRELESS_EXT */ #endif /* WIRELESS_EXT */
switch (cmd) { switch (cmd) {
......
...@@ -1849,7 +1849,7 @@ static int unix_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) ...@@ -1849,7 +1849,7 @@ static int unix_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
} }
default: default:
err = dev_ioctl(cmd, (void *)arg); err = dev_ioctl(cmd, (void __user *)arg);
break; break;
} }
return err; return err;
......
...@@ -1832,7 +1832,7 @@ static int wanpipe_ioctl(struct socket *sock, unsigned int cmd, unsigned long ar ...@@ -1832,7 +1832,7 @@ static int wanpipe_ioctl(struct socket *sock, unsigned int cmd, unsigned long ar
#endif #endif
default: default:
return dev_ioctl(cmd,(void *) arg); return dev_ioctl(cmd,(void __user *) arg);
} }
/*NOTREACHED*/ /*NOTREACHED*/
} }
......
...@@ -1306,7 +1306,7 @@ static int x25_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) ...@@ -1306,7 +1306,7 @@ static int x25_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
} }
default: default:
rc = dev_ioctl(cmd, (void *)arg); rc = dev_ioctl(cmd, (void __user *)arg);
break; 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