On Fri, Jun 12, 2026 at 07:10:15PM -0700, Stanislav Fomichev wrote:
> On 06/12, Breno Leitao wrote:

> >  int udp_lib_getsockopt(struct sock *sk, int level, int optname,
> > -                  char __user *optval, int __user *optlen)
> > +                  sockopt_t *opt)
> >  {
> >     struct udp_sock *up = udp_sk(sk);
> >     int val, len;
> >  
> > -   if (get_user(len, optlen))
> > -           return -EFAULT;
> 
> [..]
> 
> > -   if (len < 0)
> > -           return -EINVAL;
> 
> I see this part now in sockopt_init_user, but you mention that it's a
> transitional helper. When we drop it, will we loose this <0 check?
> Maybe keep `if ((int)opt->optlen < 0))` here for backwards
> compatibility?

Good idea. I will do it and respin (once net-next reopens).

Thanks for the review,
--breno

Reply via email to