diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2006-10-31 00:06:12 +0100 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-10-31 00:24:41 +0100 |
commit | a27b58fed90cc5654e2daf1d292cc5bc61be4dd7 (patch) | |
tree | 4f01c7b0bc168b9a73cd9d5406e7fbf426ab169c /net/netlink | |
parent | [SCTP]: Always linearise packet on input (diff) | |
download | linux-a27b58fed90cc5654e2daf1d292cc5bc61be4dd7.tar.xz linux-a27b58fed90cc5654e2daf1d292cc5bc61be4dd7.zip |
[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')
-rw-r--r-- | net/netlink/af_netlink.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index d56e0d21f919..d527c8977b1f 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, return -EINVAL; len = sizeof(int); val = nlk->flags & NETLINK_RECV_PKTINFO ? 1 : 0; - put_user(len, optlen); - put_user(val, optval); + if (put_user(len, optlen) || + put_user(val, optval)) + return -EFAULT; err = 0; break; default: |