Re: [PATCH rdma/wip/jgg-for-next v1 1/5] IB/{rdma,core}: ucontext should be set properly for all cmd & ioctl paths

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

 



On Tue, Feb 26, 2019 at 02:44:53PM +0200, Shamir Rabinovitch wrote:
> @@ -969,7 +943,8 @@ EXPORT_SYMBOL(uverbs_fd_class);
>  struct ib_uobject *
>  uverbs_get_uobject_from_file(u16 object_id,
>  			     struct ib_uverbs_file *ufile,
> -			     enum uverbs_obj_access access, s64 id)
> +			     enum uverbs_obj_access access, s64 id,
> +			     struct uverbs_attr_bundle *attrs)
>  {

Don't pass ufile and attrs in the same parameter list. Replace the
ufile with attrs->ufile. Several cases of this

> +	rdma_lookup_get_uobject(uobj_get_type(_attrs, _type), (_attrs)->ufile, \
> +				_uobj_check_id(_id), UVERBS_LOOKUP_READ, _attrs)
> +/*
> + * NOTE: no need to pass _attrs down to rdma_lookup_get_uobject here because
> + * rdma_lookup_get_uobject is only used to set the ucontext for idr uobjects...
> + */
>  #define ufd_get_read(_type, _fdnum, _attrs)                                    \
>  	rdma_lookup_get_uobject(uobj_get_type(_attrs, _type), (_attrs)->ufile, \
>  				(_fdnum)*typecheck(s32, _fdnum),               \
> -				UVERBS_LOOKUP_READ)
> +				UVERBS_LOOKUP_READ, NULL)

?? fd's have ubojects too, why wouldn't we pass the attrs??

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