diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2006-10-30 15:06:12 -0800 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-10-30 15:24:41 -0800 |
commit | a27b58fed90cc5654e2daf1d292cc5bc61be4dd7 (patch) | |
tree | 4f01c7b0bc168b9a73cd9d5406e7fbf426ab169c /net/netlink | |
parent | 28cd7752734563d5b0967b96a6bade7a1dc89c7f (diff) | |
download | linux-rpi3-a27b58fed90cc5654e2daf1d292cc5bc61be4dd7.tar.gz linux-rpi3-a27b58fed90cc5654e2daf1d292cc5bc61be4dd7.tar.bz2 linux-rpi3-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: |