Commit c773633f authored by Linus Torvalds's avatar Linus Torvalds

Add __user annotations to sock_get_timestamp()

parent 5140ba66
......@@ -1049,7 +1049,7 @@ static inline void net_timestamp(struct timeval *stamp)
}
}
extern int sock_get_timestamp(struct sock *, struct timeval *);
extern int sock_get_timestamp(struct sock *, struct timeval __user *);
/*
* Enable debug/info messages
......
......@@ -1795,7 +1795,7 @@ static int atalk_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
break;
}
case SIOCGSTAMP:
rc = sock_get_timestamp(sk, (struct timeval *)arg);
rc = sock_get_timestamp(sk, (struct timeval __user *)arg);
break;
/* Routing */
case SIOCADDRT:
......
......@@ -1694,7 +1694,7 @@ static int ax25_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
case SIOCGSTAMP:
if (sk != NULL) {
res = sock_get_timestamp(sk, (struct timeval *)arg);
res = sock_get_timestamp(sk, (struct timeval __user *)arg);
break;
}
res = -EINVAL;
......
......@@ -1172,7 +1172,7 @@ EXPORT_SYMBOL(release_sock);
/* When > 0 there are consumers of rx skb time stamps */
atomic_t netstamp_needed = ATOMIC_INIT(0);
int sock_get_timestamp(struct sock *sk, struct timeval *userstamp)
int sock_get_timestamp(struct sock *sk, struct timeval __user *userstamp)
{
if (!sock_flag(sk, SOCK_TIMESTAMP))
sock_enable_timestamp(sk);
......
......@@ -665,7 +665,7 @@ static int econet_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg
switch(cmd) {
case SIOCGSTAMP:
return sock_get_timestamp(sk,(struct timeval *)arg);
return sock_get_timestamp(sk,(struct timeval __user *)arg);
case SIOCSIFADDR:
case SIOCGIFADDR:
......
......@@ -843,7 +843,7 @@ int inet_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
switch (cmd) {
case SIOCGSTAMP:
err = sock_get_timestamp(sk, (struct timeval *)arg);
err = sock_get_timestamp(sk, (struct timeval __user *)arg);
break;
case SIOCADDRT:
case SIOCDELRT:
......
......@@ -474,7 +474,7 @@ int inet6_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
switch(cmd)
{
case SIOCGSTAMP:
return sock_get_timestamp(sk, (struct timeval *)arg);
return sock_get_timestamp(sk, (struct timeval __user *)arg);
case SIOCADDRT:
case SIOCDELRT:
......
......@@ -1872,7 +1872,7 @@ static int ipx_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
case SIOCGSTAMP:
rc = -EINVAL;
if (sk)
rc = sock_get_timestamp(sk, (struct timeval *)arg);
rc = sock_get_timestamp(sk, (struct timeval __user *)arg);
break;
case SIOCGIFDSTADDR:
case SIOCSIFDSTADDR:
......
......@@ -1797,7 +1797,7 @@ static int irda_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
case SIOCGSTAMP:
if (sk != NULL)
return sock_get_timestamp(sk, (struct timeval *)arg);
return sock_get_timestamp(sk, (struct timeval __user *)arg);
return -EINVAL;
case SIOCGIFADDR:
......
......@@ -1202,7 +1202,7 @@ static int nr_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
case SIOCGSTAMP:
ret = -EINVAL;
if (sk != NULL)
ret = sock_get_timestamp(sk, (struct timeval *)arg);
ret = sock_get_timestamp(sk, (struct timeval __user *)arg);
release_sock(sk);
return ret;
......
......@@ -1465,7 +1465,7 @@ static int packet_ioctl(struct socket *sock, unsigned int cmd,
return put_user(amount, (int *)arg);
}
case SIOCGSTAMP:
return sock_get_timestamp(sk, (struct timeval *)arg);
return sock_get_timestamp(sk, (struct timeval __user *)arg);
#ifdef CONFIG_INET
case SIOCADDRT:
......
......@@ -1270,7 +1270,7 @@ static int rose_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
case SIOCGSTAMP:
if (sk != NULL)
return sock_get_timestamp(sk, (struct timeval *)arg);
return sock_get_timestamp(sk, (struct timeval __user *)arg);
return -EINVAL;
case SIOCGIFADDR:
......
......@@ -1765,7 +1765,7 @@ static int wanpipe_ioctl(struct socket *sock, unsigned int cmd, unsigned long ar
switch(cmd)
{
case SIOCGSTAMP:
return sock_get_timestamp(sk, (struct timeval *)arg);
return sock_get_timestamp(sk, (struct timeval __user *)arg);
case SIOC_WANPIPE_CHECK_TX:
......
......@@ -1209,7 +1209,7 @@ static int x25_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
rc = -EINVAL;
if (sk)
rc = sock_get_timestamp(sk,
(struct timeval *)arg);
(struct timeval __user *)arg);
break;
case SIOCGIFADDR:
case SIOCSIFADDR:
......
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