[openib-general] [PATCH][SDP] __user annotations
Tom Duffy
tduffy at sun.com
Fri Feb 11 18:31:06 PST 2005
Annotate __user pointers in sdp_inet.c.
Signed-off-by: Tom Duffy <tduffy at sun.com>
Index: drivers/infiniband/ulp/sdp/sdp_inet.c
===================================================================
--- drivers/infiniband/ulp/sdp/sdp_inet.c (revision 1781)
+++ drivers/infiniband/ulp/sdp/sdp_inet.c (working copy)
@@ -1217,7 +1217,7 @@ static int _sdp_inet_ioctl(struct socket
}
else {
- result = copy_to_user((void *)arg,
+ result = copy_to_user((void __user *)arg,
&sk->sk_stamp,
sizeof(struct timeval));
result = (result ? -EFAULT : result);
@@ -1231,7 +1231,7 @@ static int _sdp_inet_ioctl(struct socket
case SIOCDELRT:
case SIOCRTMSG:
- result = ip_rt_ioctl(cmd, (void *)arg);
+ result = ip_rt_ioctl(cmd, (void __user *)arg);
break;
/*
* Standard ARP IOCTLs
@@ -1260,7 +1260,7 @@ static int _sdp_inet_ioctl(struct socket
case SIOCGIFPFLAGS:
case SIOCSIFFLAGS:
- result = devinet_ioctl(cmd, (void *)arg);
+ result = devinet_ioctl(cmd, (void __user *)arg);
break;
/*
* stadard INET STREAM IOCTLs
@@ -1274,7 +1274,7 @@ static int _sdp_inet_ioctl(struct socket
* TODO need to subtract/add URG (inline vs. OOB)
*/
value = conn->byte_strm;
- result = put_user(value, (int *) arg);
+ result = put_user(value, (int __user *) arg);
}
else {
@@ -1290,7 +1290,7 @@ static int _sdp_inet_ioctl(struct socket
if (SDP_SOCK_ST_LISTEN != conn->istate) {
value = conn->send_qud;
- result = put_user(value, (int *) arg);
+ result = put_user(value, (int __user *) arg);
}
else {
@@ -1316,13 +1316,13 @@ static int _sdp_inet_ioctl(struct socket
}
}
- result = put_user(value, (int *) arg);
+ result = put_user(value, (int __user *) arg);
SDP_CONN_UNLOCK(conn);
break;
default:
- result = dev_ioctl(cmd, (void *)arg);
+ result = dev_ioctl(cmd, (void __user *)arg);
break;
}
@@ -1334,7 +1334,7 @@ static int _sdp_inet_ioctl(struct socket
static int _sdp_inet_setopt(struct socket *sock,
int level,
int optname,
- char *optval,
+ char __user *optval,
int optlen)
{
struct sock *sk;
@@ -1362,7 +1362,7 @@ static int _sdp_inet_setopt(struct socke
return -EINVAL;
}
- if (get_user(value, (int *)optval)) {
+ if (get_user(value, (int __user *)optval)) {
return -EFAULT;
}
@@ -1422,8 +1422,8 @@ static int _sdp_inet_setopt(struct socke
static int _sdp_inet_getopt(struct socket *sock,
int level,
int optname,
- char *optval,
- int *optlen)
+ char __user *optval,
+ int __user *optlen)
{
struct sock *sk;
struct sdp_opt *conn;
More information about the general
mailing list