@@ -1647,7 +1647,7 @@ int do_ip_getsockopt(struct sock *sk, int level, int optname,
if (sk->sk_type != SOCK_STREAM)
return -ENOPROTOOPT;
- if (optval.is_kernel) {
+ if (sockptr_is_kernel(optval)) {
msg.msg_control_is_user = false;
msg.msg_control = optval.kernel;
} else {
@@ -1144,7 +1144,7 @@ int do_ipv6_getsockopt(struct sock *sk, int level, int optname,
if (sk->sk_type != SOCK_STREAM)
return -ENOPROTOOPT;
- if (optval.is_kernel) {
+ if (sockptr_is_kernel(optval)) {
msg.msg_control_is_user = false;
msg.msg_control = optval.kernel;
} else {
@@ -2366,7 +2366,7 @@ int do_sock_getsockopt(struct socket *sock, bool compat, int level,
} else if (unlikely(!ops->getsockopt)) {
err = -EOPNOTSUPP;
} else {
- if (WARN_ONCE(optval.is_kernel || optlen.is_kernel,
+ if (WARN_ONCE(sockptr_is_kernel(optval) || sockptr_is_kernel(optlen),
"Invalid argument type"))
return -EOPNOTSUPP;
Some changes to option handling directly accesses optval.is_kernel. Use the sockptr_is_kernel() helper instead. No functional change. Signed-off-by: David Laight <david.laight@aculab.com> --- net/ipv4/ip_sockglue.c | 2 +- net/ipv6/ipv6_sockglue.c | 2 +- net/socket.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)