[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2] livepatch: Pass buffer size to list sysctl



On Mon, May 12, 2025 at 11:51:35AM +0200, Jan Beulich wrote:
> On 08.05.2025 19:01, Ross Lagerwall wrote:
> > @@ -1328,10 +1327,15 @@ static int livepatch_list(struct 
> > xen_sysctl_livepatch_list *list)
> >              status.rc = data->rc;
> >  
> >              name_len = strlen(data->name) + 1;
> > -            list->name_total_size += name_len;
> > -
> >              metadata_len = data->metadata.len;
> > -            list->metadata_total_size += metadata_len;
> > +
> > +            if ( (name_total_copied + name_len) > list->name_total_size ||
> > +                 (metadata_total_copied + metadata_len) >
> > +                 list->metadata_total_size )
> > +            {
> > +                rc = -ENOMEM;
> 
> -ENOBUFS or maybe -ENOSPC, but certainly not -ENOMEM.

Jan, are you fine if I replace with -ENOBUFS on commit?

Thanks, Roger.



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.