aboutsummaryrefslogtreecommitdiffstats
path: root/net/netlink/af_netlink.c
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2006-10-30 18:06:12 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-10-30 18:24:41 -0500
commita27b58fed90cc5654e2daf1d292cc5bc61be4dd7 (patch)
tree4f01c7b0bc168b9a73cd9d5406e7fbf426ab169c /net/netlink/af_netlink.c
parent28cd7752734563d5b0967b96a6bade7a1dc89c7f (diff)
[NET]: fix uaccess handling
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netlink/af_netlink.c')
-rw-r--r--net/netlink/af_netlink.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index d56e0d21f91..d527c8977b1 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -1075,8 +1075,9 @@ static int netlink_getsockopt(struct socket *sock, int level, int optname,
1075 return -EINVAL; 1075 return -EINVAL;
1076 len = sizeof(int); 1076 len = sizeof(int);
1077 val = nlk->flags & NETLINK_RECV_PKTINFO ? 1 : 0; 1077 val = nlk->flags & NETLINK_RECV_PKTINFO ? 1 : 0;
1078 put_user(len, optlen); 1078 if (put_user(len, optlen) ||
1079 put_user(val, optval); 1079 put_user(val, optval))
1080 return -EFAULT;
1080 err = 0; 1081 err = 0;
1081 break; 1082 break;
1082 default: 1083 default: