Re: [rdma/for-next v3 5/5] IB/{core,hw,sw}: pass only ib_udata in function prototypes

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

 



On Sun, Mar 31, 2019 at 07:10:07PM +0300, Shamir Rabinovitch wrote:

> +/*
> + * NOTE:
> + *
> + * ocrdma_ucontext must be used here because this function is also
> + * called from ocrdma_alloc_ucontext where ib_udata does not have
> + * valid ib_ucontext pointer. ib_uverbs_get_context does not call
> + * uobj_{alloc|get_xxx} helpers which are used to store the
> + * ib_ucontext in uverbs_attr_bundle wrapping the ib_udata. so
> + * ib_udata does NOT imply valid ib_ucontext here!
> + */
>  static int _ocrdma_alloc_pd(struct ocrdma_dev *dev, struct ocrdma_pd *pd,
>  			    struct ocrdma_ucontext *uctx,
>  			    struct ib_udata *udata)

I think this is a mistake, the ib_uverbs_get_context should set the
ucontext in the udata as well so we don't have to have special flows
like this.

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