Re: [PATCH 01/10] RDMA: Add ib_copy_validate_udata_in()

Jason Gunthorpe
2026-02-09T14:06:46Z

On Mon, Feb 09, 2026 at 02:11:32PM +0800, Junxian Huang wrote:

> > +static inline int _ib_copy_validate_udata_in(struct ib_udata *udata, void *req,
> > + size_t kernel_size,
> > + size_t minimum_size)
> > +{
> > + int err;
> > +
> > + if (udata->inlen < minimum_size)
> > + return -EINVAL;
> > + err = copy_struct_from_user(req, kernel_size, udata->inbuf,
> > + udata->inlen);
> > + if (err) {
> > + if (err == E2BIG)
>
> The E2BIG should be negative.

Oops, thanks!!

Jason