diff options
| author | Breno Leitao <leitao@debian.org> | 2026-06-30 07:01:27 -0700 |
|---|---|---|
| committer | Paolo Abeni <pabeni@redhat.com> | 2026-07-02 12:29:06 +0200 |
| commit | f99d7065a4d45529ccfdc630c1f278da805cf59f (patch) | |
| tree | 0af47b13ef822f27419746d1f74bf3c1eb22111b /include | |
| parent | b5997f911eec53790d56ca438c8ad61e872d795b (diff) | |
| download | linux-f99d7065a4d45529ccfdc630c1f278da805cf59f.tar.gz linux-f99d7065a4d45529ccfdc630c1f278da805cf59f.zip | |
udp: convert udp_lib_getsockopt to sockopt_t
In preparation for converting the proto-layer getsockopt callbacks to the
sockopt_t interface, switch udp_lib_getsockopt() to take a sockopt_t.
The thin udp_getsockopt()/udpv6_getsockopt() wrappers keep their __user
signature for now: they build a user-backed sockopt_t with
sockopt_init_user(), call the helper, and write the returned length back
to optlen. The helper uses copy_to_iter() instead of copy_to_user().
No functional change.
Signed-off-by: Breno Leitao <leitao@debian.org>
Acked-by: Stanislav Fomichev <sdf@fomichev.me>
Acked-by: Willem de Bruijn <willemb@google.com>
Link: https://patch.msgid.link/20260630-getsockopt_phase2-v2-2-193335f3d4d1@debian.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/udp.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/udp.h b/include/net/udp.h index 8262e2b215b4..1fee17274745 100644 --- a/include/net/udp.h +++ b/include/net/udp.h @@ -430,7 +430,7 @@ struct sk_buff *skb_udp_tunnel_segment(struct sk_buff *skb, netdev_features_t features, bool is_ipv6); int udp_lib_getsockopt(struct sock *sk, int level, int optname, - char __user *optval, int __user *optlen); + sockopt_t *opt); int udp_lib_setsockopt(struct sock *sk, int level, int optname, sockptr_t optval, unsigned int optlen, int (*push_pending_frames)(struct sock *)); |
