Re: [PATCH rdma-next v1 06/10] RDMA/core: Delete function indirection for alloc/free kernel CQ

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

 



On Wed, Sep 02, 2020 at 09:20:48PM -0300, Jason Gunthorpe wrote:
> On Sun, Aug 30, 2020 at 11:40:06AM +0300, Leon Romanovsky wrote:
> >  /**
> > - * ib_free_cq_user - free a completion queue
> > + * ib_free_cq - free a completion queue
> >   * @cq:		completion queue to free.
> > - * @udata:	User data or NULL for kernel object
> >   */
> > -void ib_free_cq_user(struct ib_cq *cq, struct ib_udata *udata)
> > +void ib_free_cq(struct ib_cq *cq)
> >  {
> > -	if (WARN_ON_ONCE(atomic_read(&cq->usecnt)))
> > -		return;
> > -	if (WARN_ON_ONCE(cq->cqe_used))
> > -		return;
> > +	WARN_ON_ONCE(atomic_read(&cq->usecnt));
>
> In this case we expect ops.destroy_cq to fail, so no sense in
> continuing, leak everything, the ULP is buggy.

I disagree, we should clean as much as possible and leave the HW object.

Thanks

>
> Jason



[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