RE: [EXTERNAL] Re: [bug report] RDMA/mana_ib: implement uapi for creation of rnic cq

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

 



> >     46
> >     47                 cq->cqe = attr->cqe;
> > --> 48                 err = mana_ib_create_queue(mdev, ucmd.buf_addr, cq->cqe *
> COMP_ENTRY_SIZE,
> >
> > ^^^^^^^^^^^^^^^^^^^^^^^^^
> >
> > This can lead to integer wrapping.
> >
> > The call tree is:
> >
> > ib_uverbs_create_cq() <- copies cmd.cqe from the user
> >   -> create_cq() calls (struct ib_device_ops)->create_cq()
> >      -> mana_ib_create_cq()
> >
> > I'm not sure if this integer overflow has any negative effects.  I
> > think it's probably fine?
> 
> It is not nice and worth to be fixed, but technically it looks like size (cq->cqe *
> COMP_ENTRY_SIZE) is used to get UMEM memory, so we will allocate less
> than driver would like to.
> 
> Thanks

Thanks. I totally agree. I have already prepared a patch.
Once it passes internal tests (in 4 hours), I will send it.

- Konstantin




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux