diff options
author | Arnaldo Carvalho de Melo <acme@mandriva.com> | 2005-08-16 18:46:48 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2005-08-29 19:01:39 -0400 |
commit | 4c6ea29d82e0d1b9b37e6b879e0a7fd6c409333d (patch) | |
tree | a11270e23933664056cfd3d53e3ae2a661515d23 /net/ipv4/ip_sockglue.c | |
parent | 6ed8a48582c08432e84e5610564c1d25fe00dd7f (diff) |
[IP]: Introduce ip_options_get_from_user
This variant is needed to satisfy sparse __user annotations.
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ip_sockglue.c')
-rw-r--r-- | net/ipv4/ip_sockglue.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c index aca088b3707a..2f0b47da5b37 100644 --- a/net/ipv4/ip_sockglue.c +++ b/net/ipv4/ip_sockglue.c | |||
@@ -153,7 +153,7 @@ int ip_cmsg_send(struct msghdr *msg, struct ipcm_cookie *ipc) | |||
153 | switch (cmsg->cmsg_type) { | 153 | switch (cmsg->cmsg_type) { |
154 | case IP_RETOPTS: | 154 | case IP_RETOPTS: |
155 | err = cmsg->cmsg_len - CMSG_ALIGN(sizeof(struct cmsghdr)); | 155 | err = cmsg->cmsg_len - CMSG_ALIGN(sizeof(struct cmsghdr)); |
156 | err = ip_options_get(&ipc->opt, CMSG_DATA(cmsg), err < 40 ? err : 40, 0); | 156 | err = ip_options_get(&ipc->opt, CMSG_DATA(cmsg), err < 40 ? err : 40); |
157 | if (err) | 157 | if (err) |
158 | return err; | 158 | return err; |
159 | break; | 159 | break; |
@@ -425,7 +425,7 @@ int ip_setsockopt(struct sock *sk, int level, int optname, char __user *optval, | |||
425 | struct ip_options * opt = NULL; | 425 | struct ip_options * opt = NULL; |
426 | if (optlen > 40 || optlen < 0) | 426 | if (optlen > 40 || optlen < 0) |
427 | goto e_inval; | 427 | goto e_inval; |
428 | err = ip_options_get(&opt, optval, optlen, 1); | 428 | err = ip_options_get_from_user(&opt, optval, optlen); |
429 | if (err) | 429 | if (err) |
430 | break; | 430 | break; |
431 | if (sk->sk_type == SOCK_STREAM) { | 431 | if (sk->sk_type == SOCK_STREAM) { |