Re: [PATCH for-next] RDMA/qedr: Remove unsupported qedr_resize_cq callback

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

 



On Mon, Oct 25, 2021 at 09:24:41AM +0000, Prabhakar Kushwaha wrote:
> Dear Kamal,
>  
> > From: Kamal Heib <kamalheib1@xxxxxxxxx>
> > Sent: Monday, October 25, 2021 9:27 AM
> > To: linux-rdma@xxxxxxxxxxxxxxx
> > Cc: Michal Kalderon <mkalderon@xxxxxxxxxxx>; Ariel Elior
> > <aelior@xxxxxxxxxxx>; Doug Ledford <dledford@xxxxxxxxxx>; Jason
> > Gunthorpe <jgg@xxxxxxxx>; Kamal Heib <kamalheib1@xxxxxxxxx>
> > Subject:  [PATCH for-next] RDMA/qedr: Remove unsupported
> > qedr_resize_cq callback
> > 
> > External Email
> > 
> > There is no need to return always zero for function which is not supported.
> > 
> > Fixes: a7efd7773e31 ("qedr: Add support for PD,PKEY and CQ verbs")
> > Signed-off-by: Kamal Heib <kamalheib1@xxxxxxxxx>
> >  drivers/infiniband/hw/qedr/main.c  |  1 -  drivers/infiniband/hw/qedr/verbs.c |
> > 10 ----------  drivers/infiniband/hw/qedr/verbs.h |  1 -
> >  3 files changed, 12 deletions(-)
> 
> Have you tested this patch? I afraid, there may be a crash because of  this 
> 
> static int ib_uverbs_resize_cq(struct uverbs_attr_bundle *attrs)
> {
> <snip>
> 
>         cq = uobj_get_obj_read(cq, UVERBS_OBJECT_CQ, cmd.cq_handle, attrs);
>         if (!cq)
>                 return -EINVAL;
> 
>         ret = cq->device->ops.resize_cq(cq, cmd.cqe, &attrs->driver_udata);    <<<< No check for NULL.

The NULL check is here:

		DECLARE_UVERBS_WRITE(IB_USER_VERBS_CMD_RESIZE_CQ,
				     ib_uverbs_resize_cq,
				     UAPI_DEF_WRITE_UDATA_IO(
					     struct ib_uverbs_resize_cq,
					     struct ib_uverbs_resize_cq_resp),
				     UAPI_DEF_METHOD_NEEDS_FN(resize_cq)),

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