From: Jason Gunthorpe <jgg@ziepe.ca>
To: Prabhakar Kushwaha <pkushwaha@marvell.com>
Cc: "linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
"kamalheib1@gmail.com" <kamalheib1@gmail.com>,
Michal Kalderon <mkalderon@marvell.com>,
"dledford@redhat.com" <dledford@redhat.com>,
Ariel Elior <aelior@marvell.com>, Alok Prasad <palok@marvell.com>
Subject: Re: [PATCH for-next] RDMA/qedr: Remove unsupported qedr_resize_cq callback
Date: Mon, 25 Oct 2021 11:27:04 -0300 [thread overview]
Message-ID: <20211025142704.GK3686969@ziepe.ca> (raw)
In-Reply-To: <DM5PR1801MB20576F5ED830B11E8F83A037B2839@DM5PR1801MB2057.namprd18.prod.outlook.com>
On Mon, Oct 25, 2021 at 09:24:41AM +0000, Prabhakar Kushwaha wrote:
> Dear Kamal,
>
> > From: Kamal Heib <kamalheib1@gmail.com>
> > Sent: Monday, October 25, 2021 9:27 AM
> > To: linux-rdma@vger.kernel.org
> > Cc: Michal Kalderon <mkalderon@marvell.com>; Ariel Elior
> > <aelior@marvell.com>; Doug Ledford <dledford@redhat.com>; Jason
> > Gunthorpe <jgg@ziepe.ca>; Kamal Heib <kamalheib1@gmail.com>
> > 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@gmail.com>
> > 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
next prev parent reply other threads:[~2021-10-25 14:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-25 9:24 [PATCH for-next] RDMA/qedr: Remove unsupported qedr_resize_cq callback Prabhakar Kushwaha
2021-10-25 10:06 ` Kamal Heib
2021-10-25 10:54 ` [EXT] " Prabhakar Kushwaha
2021-10-25 14:27 ` Jason Gunthorpe [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-10-25 6:26 Kamal Heib
2021-10-25 19:48 ` Jason Gunthorpe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211025142704.GK3686969@ziepe.ca \
--to=jgg@ziepe.ca \
--cc=aelior@marvell.com \
--cc=dledford@redhat.com \
--cc=kamalheib1@gmail.com \
--cc=linux-rdma@vger.kernel.org \
--cc=mkalderon@marvell.com \
--cc=palok@marvell.com \
--cc=pkushwaha@marvell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).